-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(agent): watch for changes in configuration files in config directories #12127
fix(agent): watch for changes in configuration files in config directories #12127
Conversation
…ories Collect a list of config files to load configuration from. Reuse the same list later to schedule automatic reloads for changed files.
Thanks so much for the pull request! |
!signed-cla |
!signed-cla |
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.
Thank you for working on this! I've also left some minor suggestions.
Not sure why the bot doesn't think you've signed the CLA I checked manually and I see that you did. Sorry about that. edit: I've manually approved the CLA
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
PR influxdata#12127 added the ability to reload on files in configuration directories. However, this broke any and all reloading. The PR assumed that the list of config files was initialized and set up, however it is always empty as-is. To populate the config files variable, the secret-store PR, influxdata#11232, added the loadConfiguraiton call. This needs to be run first before attempting to watch any files.
Required for all PRs
resolves #9985
Another iteration on the fix from #10379 by @conorevans.
Extracted config.WalkDirectory to collect a list of config files to load configuration from. Reuse the same list later to schedule automatic reloads for changed files.