apibara / dna

Apibara is the fastest platform to build production-grade indexers that connect onchain data to web2 services.
https://www.apibara.com/
Apache License 2.0
166 stars 26 forks source link

Always restart indexer container #346

Open fracek opened 3 months ago

fracek commented 3 months ago

Describe the bug

At the moment, the indexer's pod is not restarted if the container exists with a 0 exit code. In production this causes some issues because while in theory no indexer exits with exit code 0 , in practice it happens and the indexer is not restarted.

To Reproduce

This is hard to reproduce, probably the easiest way is by setting the ENDING_BLOCK environment variable to stop the indexer when it reaches that block.

Expected behavior

The indexer pod should be restarted and the restart count should be incremented.

Additional context

Probably need an extra check in this code