Fix flaky CI integration test failures#7336
Merged
CharlieTLe merged 1 commit intoMar 9, 2026
Merged
Conversation
769fc2c to
e7bfe47
Compare
Fix three flaky integration tests: 1. TestStartStop: Add `docker rm --force` after `docker wait` in service Stop() and Kill() to prevent container name collisions. Docker removes --rm containers asynchronously after process exit, so an explicit removal prevents races on restart. 2. TestIngesterMetadataWithTenantFederation: Add WaitMissingMetrics option when waiting for ring member metrics. With tenant federation enabled, the metrics endpoint takes longer to expose ring metrics. 3. TestBackwardCompatibilityQueryFuzz: Filter out additional PromQL constructs that produce different results between Cortex versions: double negation (--), quantile, predict_linear, and atan2. Also fix a pre-existing failure in the Parquet shuffle sharding test by waiting for the compactor's blocks cleaner to complete before querying. The parquet store-gateway discovers blocks on-demand through the bucket index (SyncBlocks/InitialSync are no-ops), so the bucket index must exist before queries can succeed. Signed-off-by: Charlie Le <charlie.le@grafana.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Charlie Le <charlie_le@apple.com>
e7bfe47 to
93092c0
Compare
Shvejan
pushed a commit
to Shvejan/cortex
that referenced
this pull request
Mar 25, 2026
Fix three flaky integration tests: 1. TestStartStop: Add `docker rm --force` after `docker wait` in service Stop() and Kill() to prevent container name collisions. Docker removes --rm containers asynchronously after process exit, so an explicit removal prevents races on restart. 2. TestIngesterMetadataWithTenantFederation: Add WaitMissingMetrics option when waiting for ring member metrics. With tenant federation enabled, the metrics endpoint takes longer to expose ring metrics. 3. TestBackwardCompatibilityQueryFuzz: Filter out additional PromQL constructs that produce different results between Cortex versions: double negation (--), quantile, predict_linear, and atan2. Also fix a pre-existing failure in the Parquet shuffle sharding test by waiting for the compactor's blocks cleaner to complete before querying. The parquet store-gateway discovers blocks on-demand through the bucket index (SyncBlocks/InitialSync are no-ops), so the bucket index must exist before queries can succeed. Signed-off-by: Charlie Le <charlie_le@apple.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.
Summary
Fix three flaky integration tests and Parquet bucket index race conditions:
TestStartStop: Add
docker rm --forceafterdocker waitin serviceStop()andKill()to prevent container name collisions. Docker removes--rmcontainers asynchronously after process exit, so an explicit removal prevents races on restart.TestIngesterMetadataWithTenantFederation: Add
WaitMissingMetricsoption when waiting for ring member metrics. With tenant federation enabled, the metrics endpoint takes longer to expose ring metrics.TestBackwardCompatibilityQueryFuzz: Filter out additional PromQL constructs that produce different results between Cortex versions: double negation (
--),quantile,predict_linear, andatan2.Parquet bucket index race condition (both single binary and microservices mode): Wait for the compactor's blocks cleaner to complete before querying. The parquet store-gateway discovers blocks on-demand through the bucket index (
SyncBlocks/InitialSyncare no-ops), so the bucket index must exist before queries can succeed. Affected tests:TestQuerierWithBlocksStorageRunningInMicroservicesMode(Parquet shuffle sharding)TestQuerierWithBlocksStorageRunningInSingleBinaryMode(Parquet sharding)Test plan
🤖 Generated with Claude Code