graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.91k stars 975 forks source link

[Bug] graphman accepts deployment or namespace misleading to errors #5270

Open rotarur opened 8 months ago

rotarur commented 8 months ago

Bug report

In graphman help, like graphman drop --help it accepts the DEPLOYMENT as an identifier to which SG to remove. The Deployment is unique everywhere in our system and if I try to drop a SG by using the deployment it will get removed from everywhere as usual.

The problem is that the drop command also accepts the namespace, which is unique only to the respective shard where this SG is deployed.

The graphman shouldn't accept the namespace if the help is saying to use the deployment identifier, otherwise it leads to critical mistakes when we want to remove the SG only from a specific shard and not from everywhere.

Also if you might consider this also as a feature request, there should be a possibility to drop the SG only from a specific shard by using it's namespace (if it's a single SG in that table, otherwise throw a warning that's not possible to remove it because there are multiple deployments using the same table)

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

OS information

macOS

github-actions[bot] commented 2 months ago

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