FuelLabs / fuel-indexer

🗃 The Fuel indexer is a standalone service that can be used to index various components of the Fuel blockchain.
https://docs.fuel.network/docs/indexer/
140 stars 66 forks source link

Improve `--replace-indexer` message when redeploying an indexer #1461

Open Braqzen opened 10 months ago

Braqzen commented 10 months ago

I had a service running in the docker container which did not include the --replace-indexer flag.

When I have altered an indexer and wanted to redeploy it I was presented with a message telling me to add the --replace-indexer flag but it did not tell me where to use it.

I have assumed that I was meant to replace

forc index deploy

with

forc index deploy --replace-indexer

but that was insufficient.

1

To fix the issue and redeploy the new version of the indexer I had to start the indexer service with that --replace--indexer flag in order for the flag in the deploy command to work.

Solution: replace the current message to inform the user that both the service and the deploy command must provide the --replace-indexer flag in order to redeploy an indexer under the same name.

richardgreg commented 9 months ago

Loud and clear.

When you initially run for index deploy after altering the service, the message should read Indexer({namespace}. {identifier}) already exists. Use --replace-indexer to re-start the indexer service and again during deployment.