[BUG] Race condition between Config module and module configuration requests
kon14 opened this issue · comments
Describe the bug
The Config
module currently expects any configurable modules being brought up, or at the very least attempt communication, after Database
so that the Config
schema can be registered and the module service becoming functional before any incoming requests make their way through gRPC.
This is especially a problem for modules expecting to migrate their configuration early in their initialization.
To Reproduce
Steps to reproduce the behavior:
- Bring up
Core
- Start
Authentication
- Start
Database
- Notice errors (eg
No database instance provided!
as a result of uninitializedConfig
model singleton)
Expected behavior
Config should probably be caching early configuration requests and performing them once ready(?)
Otherwise, Conduit's initialization will have to be reworked so that Config
is becomes serviceable before modules get a chance to communicate with it.