fix(integration): Fix flaky TestParquetFuzz by uploading block before cortex starts#7499
Open
fix(integration): Fix flaky TestParquetFuzz by uploading block before cortex starts#7499
Conversation
590072a to
f8d381b
Compare
Two issues caused this test to be flaky: 1. Cortex started before the block was uploaded to minio, causing the compactor to see a partial block on its first scan and skip it. The bucket index was never updated within the 30s poll timeout. Fix: upload the block before starting cortex. 2. The fuzz test compared Cortex (with parquet queryable) against standalone Prometheus without skipping queries with known cross-version semantic differences (stdvar/stddev changed in prometheus/prometheus#14941). The random seed meant some runs would generate these queries and fail. Fix: pass skipStdAggregations=true since this test compares against a standalone Prometheus instance. Also increase the poll timeout from 30s to 60s as a safety margin for slow arm64 CI runners. Signed-off-by: Ben Ye <benye@amazon.com>
f8d381b to
b681b3d
Compare
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
Fixes the flaky
TestParquetFuzzintegration test.Root Cause
The test was flaky because cortex (including the compactor) started before the block was uploaded to minio. This caused a race condition:
"skipped partial block when updating bucket index")"unable to push cleaning job to usersChan"), delaying subsequent scansThis was only observed on arm64 CI runners which are slower.
Fix
Why not just increase the timeout?
Increasing the timeout alone would mask the root cause. The real issue is that the compactor's first scan races with the block upload. By uploading first, we eliminate the race entirely and the bucket index is created on the first scan cycle.