Skip to content

fix: clarify target-dir mismatch for rules-dir#2310

Merged
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/config-reloader-target-dir-message
Jun 20, 2026
Merged

fix: clarify target-dir mismatch for rules-dir#2310
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/config-reloader-target-dir-message

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

fixes a misleading config-reloader error when --target-dir is used with legacy --rules-dir.

right now the binary says --watched-dir even if the user passed only --rules-dir. kinda confusing, since --rules-dir is still supported for compat.

repro:
go run ./cmd/config-reloader -rules-dir=/tmp/a -target-dir=/tmp/x,/tmp/y

before:
--target-dir count (2) must match --watched-dir count (1)

after:
--target-dir count (2) must match watched directory count (1) from --watched-dir/--rules-dir

also adds a tiny regression test and updates the generated flag doc.

Signed-off-by: immanuwell <pchpr.00@list.ru>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@AndrewChubatiuk AndrewChubatiuk enabled auto-merge (squash) June 20, 2026 12:04
@AndrewChubatiuk AndrewChubatiuk merged commit 136ab76 into VictoriaMetrics:master Jun 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants