-
Notifications
You must be signed in to change notification settings - Fork 191
feat(config): add drop-in configuration support with dynamic reload #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,719
−56
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47f2db7 to
8b5f7c4
Compare
Add support for flexible configuration management through both main config files and drop-in directories - Load config from --config (main file) and --config-dir (drop-in directory) - Drop-in files processed in alphabetical order for predictable overrides - Partial configuration support - drop-in files can override specific values - Dynamic configuration reload via SIGHUP signal - SIGHUP support requires either --config or --config-dir flag at startup Signed-off-by: Nader Ziada <[email protected]>
8b5f7c4 to
dfe4483
Compare
16 tasks
…ests
Refactors drop-in configuration loading to use deep merge strategy:
- Add DefaultDropInConfigDir constant ("conf.d") for auto-discovery
- Implement deepMerge() for recursive merging of nested config maps
- Merge raw TOML maps before parsing to preserve extended configs
(cluster_provider_configs, toolset_configs) across multiple drop-ins
- Simplify Read() signature to (configPath, dropInConfigDir string)
- Auto-resolve relative drop-in paths against config file directory
Add comprehensive test coverage:
- Unit tests for deepMerge() function (flat, nested, type mismatch, arrays)
- Tests for default conf.d auto-discovery and resolution
- Tests for standalone --config-dir mode without main config
- Tests for extended config merging across multiple drop-in files
- SIGHUP signal handler integration tests verifying:
- Config reload from file triggers tool updates
- Drop-in directory changes are reloaded
- Invalid config gracefully continues with old config
- Config-dir only mode works with SIGHUP
Signed-off-by: Marc Nuri <[email protected]>
manusa
requested changes
Dec 4, 2025
Member
manusa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a PR to your branch with some refactors and test suites:
feat(config)!: add deep merge for drop-in configs and SIGHUP reload tests
manusa
approved these changes
Dec 4, 2025
Member
manusa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
Use build tag instead of runtime skip to exclude Unix-specific SIGHUP signal tests from Windows builds. Signed-off-by: Marc Nuri <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
follow up to PRs: #493 , #502 and #520
fixes #548
Add support for flexible configuration management through both main config files and drop-in directories