Fix flaky compactor tests: ignore userIndexUpdateLoop error logs in exact log-set assertions - #7859
Open
CharlieTLe with Copilot wants to merge 2 commits into
Open
CharlieTLe with Copilot wants to merge 2 commits into
CharlieTLe with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: CharlieTLe <3375195+CharlieTLe@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix flaky test for compactor log output assertion
Fix flaky compactor tests: ignore userIndexUpdateLoop error logs in exact log-set assertions
Sep 22, 2026
CharlieTLe
marked this pull request as ready for review
September 22, 2026 21:52
This branch has not been deployed
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.
What this PR does:
TestCompactor_ShouldCompactAllUsersOnShardingEnabledButOnlyOneInstanceRunningfails intermittently on the arm64-raceCI job: the backgrounduserIndexUpdateLoopticks every ~100ms in tests (viaprepare()'s user-index strategy) and logs a ring error whenever no healthy instance exists — before the lifecycler is ACTIVE or during LEAVING at shutdown. Any tick landing in the test window leaks an extra line into the exact log-set assertion, failing withelements differ.removeIgnoredLogsalready suppresses two of the loop's log lines via map entries; the two error lines were missed because their variableerr=payloads require regexes. This adds them:Since all 14 exact log-set assertions in
compactor_test.goandcompactor_paritioning_test.gofunnel throughremoveIgnoredLogs, this single change covers every sharding-enabled test exposed to the same race. Regexes were verified against real go-kit logfmt output, including the exacterr="at least 1 live replicas required, could only find 0"line from the failed CI jobs. Test-only change; no production behavior modified.Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flags