apicollective / apibuilder

Simple, Comprehensive Tooling for Modern APIs
https://www.apibuilder.io/
MIT License
562 stars 82 forks source link

Refactor backgrounds tasks for better visibility #926

Closed mbryzek closed 3 months ago

mbryzek commented 3 months ago

Prior to this change, tasks were managed either via ephemeral messages in actor or via a tasks table

After this change, all tasks are managed via a central tasks table with actors running in parallel (one for each task type). Error reporting is fully centralized and retry is built in.

We also can now remove the custom migrations table used to log errors for versions of applications that failed to upgrade to the latest service spec (all migrations have completed, in future we can monitor via these tasks)

We also introduce the groundwork for periodically checking invariants to increase quality of monitoring. Future work will wire up the invariants.