fix(agent): watch for changes in configuration files in config directories#12127
Merged
MyaLongmire merged 2 commits intoinfluxdata:masterfrom Nov 7, 2022
Merged
Conversation
…ories Collect a list of config files to load configuration from. Reuse the same list later to schedule automatic reloads for changed files.
Contributor
|
Thanks so much for the pull request! |
Contributor
Author
|
!signed-cla |
Contributor
Author
Contributor
Author
|
!signed-cla |
sspaink
suggested changes
Nov 3, 2022
3 tasks
Hipska
approved these changes
Nov 4, 2022
Contributor
|
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 |
Hipska
approved these changes
Nov 7, 2022
sspaink
approved these changes
Nov 7, 2022
MyaLongmire
approved these changes
Nov 7, 2022
powersj
added a commit
to powersj/telegraf
that referenced
this pull request
Jan 3, 2023
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.
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
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.
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.