Skip to content

fix(configreload): make Start idempotent - #337

Merged
frahlg merged 2 commits into
masterfrom
codex/harden-configreload-start-20260526-175635
May 26, 2026
Merged

frahlg merged 2 commits into
masterfrom
codex/harden-configreload-start-20260526-175635

Conversation

@frahlg

@frahlg frahlg commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Make configreload.Watcher.Start() truly idempotent
  • Prevent duplicate watcher goroutines from repeated Start() calls
  • Add regression coverage for duplicate start, one config change, one applier call, and safe repeated stop

Test plan

  • GOCACHE=/private/tmp/ftw-go-build-cache go test ./internal/configreload -count=1
  • GOCACHE=/private/tmp/ftw-go-build-cache go test ./internal/config -run TestRestartRequiredFor -count=1
  • GOCACHE=/private/tmp/ftw-go-build-cache go test ./internal/ha -run 'TestStopIdempotent|TestReloadAfterStopRejected' -count=1
  • git diff --check

@frahlg
frahlg marked this pull request as ready for review May 26, 2026 16:58
@frahlg
frahlg merged commit 9056547 into master May 26, 2026
@frahlg
frahlg deleted the codex/harden-configreload-start-20260526-175635 branch May 26, 2026 17:02
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.

1 participant