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

Add json-rpc api support for dropping subgraphs

Open mangas opened this issue 1 year ago • 2 comments

Add json-rpc method for dropping subgraphs. Using this endpoint will remove all the subgraphs for the deployment_id and will delete the underlying data. docker/bin/drop is a helper script to use the new endpoint.

Adding some sane defaults as discussed:

 ./docker/bin/drop Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
Dropping deployment Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
{"jsonrpc":"2.0","error":{"code":1,"message":"subgraph registrar error with store: store error: multiple subgraphs exist fo
r this hash, please remove them before trying to drop"},"id":"1"}
./docker/bin/remove y
{"jsonrpc":"2.0","result":{"type":"Null"},"id":"1"}
./docker/bin/drop Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
Dropping deployment Qmd3vU6y6pxxXPrvVWRZMN9soNB8AFQCEnqPa9jMSZZDEG
{"jsonrpc":"2.0","result":{"type":"Null"},"id":"1"}%

mangas avatar Sep 29 '24 21:09 mangas

Perhaps explore Indexer Agent-based solution to avoid graphman drop danger zone?

alex-pakalniskis avatar Oct 07 '24 15:10 alex-pakalniskis

Perhaps explore Indexer Agent-based solution to avoid graphman drop danger zone?

Not sure I understand the argument here. This is a private endpoint, it's as dangerous as letting someone add subgraphs unboundedly and fill up the disks, taking down the graph-node. It is also a basic operational task that currently cannot be automated because it's not exposed in any api.

mangas avatar Oct 07 '24 15:10 mangas

This pull request hasn't had any activity for the last 90 days. If there's no more activity over the course of the next 14 days, it will automatically be closed.

github-actions[bot] avatar Feb 19 '25 00:02 github-actions[bot]