Open lutter opened 1 year ago
Reopening this issue as the changes were reverted by #644
Is this still needing to be done @tilacog ?
Positive. We tried this on #615 but it has been reverted on #644.
That would make it possible to use name-based rules with graph-node, e.g., to deploy subgraphs that are known to get a lot of queries into a more powerful database shard.
What is the best workflow for this? From what I can tell your best bet is changing the regex match in the graph-node config toml every time you want to deploy a new subgraph to a VIP shard.
I ask because the graph-node docs currently point towards a slightly different workflow. Here it shows a VIP shard matching the words vip
or important
. Given these are some of the only docs for sharding, we started architecting our sharded graph-node database with this workflow in mind, and tried manually deploying subgraphs with the naming scheme vip/hash
to get the deployments on the right shard.
Ultimately, I think indexers would rather have this behavior be connected to the commands you enter to start syncing a subgraph, like graph indexer rules prepare subgraph_hash [user_defined_keyword]
, along with the naming convention being something like [user_defined_keyword/]name/hash
, than a graph-node config file change. But let me know if I'm misunderstanding the workflow being proposed here.
Side note - with this feature, is it possible to add a check to see if a subgraph has already been deployed under a different name before indexer-agent deploys it under whatever naming convention is chosen? I think that would fix the 'duplicate named deployments pointing to the same schema' bug that has been seen a few times, including here when we added subgraphs to the offchain sync list after manually deploying them with vip
keywords in the name.
Right now,
indexer-agent
deploys subgraphs under the nameindexer-agent/<hash>
intograph-node
. That makes it impossible to use somegraph-node
features, especially deployment rules to control how deployments are indexed.The naming scheme should be changed to
<subgraph name>/<hash>
so that a subgraph might be calleduser/name/hash
. That would make it possible to use name-based rules withgraph-node
, e.g., to deploy subgraphs that are known to get a lot of queries into a more powerful database shard.Edited by @tilacog: