fix: recover config defaults after degraded bootstrap - #17
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8784faa6d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| scope: AppEnvScope, | ||
| ) { | ||
| val defaults = | ||
| scope.bindingsSnapshot().values.filterNot(ConfigBinding<*>::initialized).map { binding |
There was a problem hiding this comment.
Retry defaults even when the cache initialized the binding
When the initial default sync fails but degraded bootstrap successfully restores this binding from a cached snapshot, initialized() is true, so this filter produces no defaults. refreshScope then removes the scope's pending-default marker, meaning subsequent refreshes never retry the failed seed even after service-config recovers. Track and retry the bindings whose default sync failed rather than deriving that set from runtime initialization state.
Useful? React with 👍 / 👎.
Pull Request
Description
Retries the default-config seed only for scopes whose initial degraded bootstrap could not reach service-config. Once the service recovers, the next config refresh or NATS event seeds the missing defaults and loads the snapshot.
Type of Change
Related Issues
Testing
./gradlew check)Checklist