config-reloader: exit early if --only-init-config is set#1787
Open
AndrewChubatiuk wants to merge 2 commits intomasterfrom
Open
config-reloader: exit early if --only-init-config is set#1787AndrewChubatiuk wants to merge 2 commits intomasterfrom
AndrewChubatiuk wants to merge 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
3 issues found across 4 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="docs/CHANGELOG.md">
<violation number="1" location="docs/CHANGELOG.md:30">
P3: The changelog links to a non-existent `cmd/config-reloader/README.md`, which will 404. Update the link to an existing document or directory (e.g., the config-reloader folder) so documentation links remain valid.</violation>
<violation number="2" location="docs/CHANGELOG.md:30">
P2: Rule violated: **Changelog Review Agent**
Changelog entry violates the required structure by omitting explicit before/after behavior and user-visible improvement, and it describes a fix that only affects the narrow --only-init-config flag audience rather than the majority of users. The entry must be rejected under the Changelog Review Agent rules.</violation>
</file>
<file name="cmd/config-reloader/file_watch.go">
<violation number="1" location="cmd/config-reloader/file_watch.go:67">
P2: The new early return skips `fw.wg.Done()`, so `close()` can hang forever when `--only-init-config` is set and the initial update succeeds. Ensure the waitgroup is decremented before returning.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
de3c1a6 to
50c36b7
Compare
Contributor
Author
|
@cubic-dev-ai review this PR |
Contributor
@AndrewChubatiuk I have started the AI code review. It will take a few minutes to complete. |
Contributor
There was a problem hiding this comment.
2 issues found across 4 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="cmd/config-reloader/file_watch.go">
<violation number="1" location="cmd/config-reloader/file_watch.go:42">
P2: Initial load treats nil previous content as equal to an empty config file, so only-init mode fails if the config file/secret is empty. Skip the equality check on the first load so an empty config is still written and treated as successful.</violation>
</file>
<file name="docs/CHANGELOG.md">
<violation number="1" location="docs/CHANGELOG.md:32">
P2: Rule violated: **Changelog Review Agent**
Changelog entry does not follow the required structure: it lacks an explicit before/after user-centric explanation of the behavior change. The rule requires stating how it worked before and what changed now.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
e4f50c2 to
0931de4
Compare
27f2182 to
18faf37
Compare
Signed-off-by: Andrii Chubatiuk <achubatiuk@victoriametrics.com>
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.
fixes #1785
Summary by cubic
Ensure config-reloader exits after the initial config update when --only-init-config is set, so it doesn’t start background watchers or resyncs. Fixes the unexpected long-running behavior from #1785.
Written for commit dd7cc0e. Summary will update on new commits.