graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

[Feature] Configure views for subgraphs status data unioned from sharded databases

Open datanexus-vincent opened this issue 2 years ago • 4 comments

Description

Derek (@Data-Nexus) had the great idea to create views for the different tables from the subgraphs schema that union all of the different foreign tables available in each shard's schema. For example, we have a subgraph_deployment_vw, subgraph_error_vw , subgraph_manifest_vw, subgraph_version_vw, and subgraph_vw. (Note: we didn't make one for subgraphs.subgraph_deployment_assigment because we found that table to be identical across all shards)

Would it be possible to automatically create views that union each foreign table from the shard_{shard name}_subgraphs schemas? That would make overview grafana dashboards for sharded deployments a lot easier to create and distribute.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

If my other feature request is implemented, it would be useful to have a union view for public.ethereum_networks as well.

Some information to help us out

  • [ ] Tick this box if you plan on implementing this feature yourself.
  • [X] I have searched the issue tracker to make sure this issue is not a duplicate.

datanexus-vincent avatar Aug 24 '23 16:08 datanexus-vincent

these foreign tables may also be required for copy/grafting https://github.com/graphprotocol/graph-node/issues/4719

madumas avatar Aug 31 '23 13:08 madumas

They are not needed for copy/grafting; graph-node handles that already by picking the right shard/foreign schema as needed.

The problem with these views is in how they interact with updates to the mappings, if they are ever needed: any update to them will drop the views. It'll require some more logic in this already very complicated piece of code. I'll have to think about that a bit.

lutter avatar Sep 20 '23 16:09 lutter

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.

github-actions[bot] avatar Mar 23 '24 00:03 github-actions[bot]

Any thoughts on this one @lutter?

azf20 avatar Mar 24 '24 23:03 azf20