Skip to content

fix: handle config-reloader dir watch remove events#2306

Merged
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/config-reloader-dir-delete-watch
Jun 18, 2026
Merged

fix: handle config-reloader dir watch remove events#2306
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/config-reloader-dir-delete-watch

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

tiny fix in config-reloader.

when a watched file gets removed from a rules dir, the watcher skips remove events, so it doesnt reload. if a target dir is used, the stale file sticks around there too, kinda meh.

fix:

  • process remove events like normal dir changes
  • add tests for delete reload and target dir cleanup

repro:

  1. start config-reloader and watch a dir with rules.yaml
  2. delete rules.yaml
  3. before this patch, no reload is triggered
  4. if a target dir is configured, the stale file stays there too

checks:

  • make lint
  • make manifests
  • make api-gen
  • make docs
  • go test ./cmd/config-reloader
  • go test $(go list ./... | grep -v /e2e)

@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 2 files

Re-trigger cubic

@AndrewChubatiuk AndrewChubatiuk enabled auto-merge (squash) June 18, 2026 08:44
@AndrewChubatiuk AndrewChubatiuk merged commit b989522 into VictoriaMetrics:master Jun 18, 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