Skip to content

fix(CI): flaky tests and retry merge queue tests with backoff - #6875

Open
dayaffe wants to merge 2 commits into
mainfrom
david-yaffe/ci-flaky-hardening
Open

dayaffe wants to merge 2 commits into
mainfrom
david-yaffe/ci-flaky-hardening

Conversation

@dayaffe

@dayaffe dayaffe commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds retries to the merge queue test runs and fixes the most common flaky tests from the last two months of CI.

Retries. Unit tests, make test-all and coverage now use the nextest ci profile:

  • Failing tests are retried twice, with a 1–4s backoff. Retries used to run back to back without backoff which didn't help.
  • The run continues after a failure. make test-all used to stop at the first one. This means if multiple tests fail in make test-all all the failures will be reported instead of just one
  • A single test running for more than 10 minutes is killed and retried, instead of running until the job times out.

Flaky test fixes. All test-side; mostly tests not waiting long enough or waiting on the wrong thing.

Test Cause CI jobs affected (Aug–Sep)
Kafka tests used a topic before Kafka finished creating it (the 09-30 failure) 13
test_ingest_v1_happy_path ingested into a new index before it was ready, got a 404 13
test_ingester_close_shards held a lock the code under test also needed 4
retiring-indexer / graceful-shutdown tests exact doc counts fail if a document is written twice, which ingest v2 allows 2
test_indexer_exceeding_max_num_partitions the test's fast-forwarded clock could skip past a timeout 1

How was this PR tested?

make test-all passes, and clippy and fmt are clean.

Each fixed test was run repeatedly on an overloaded machine with retries off, before and after the fix:

Tests Failed runs before Failed runs after
Kafka tests 2 of 30 0 of 30
test_ingester_close_shards 2 of 300 0 of 300
test_indexer_exceeding_max_num_partitions 2 of 200 0 of 200
Retiring-indexer and graceful-shutdown tests 4 of 20 0 of 120
test_retiring_indexer_receives_empty_plan crash 1 in 3 full-suite runs 0 of 60
Janitor delete and garbage-collection tests 5 of 200 0 of 200
Health-check tests (heavier load) 21 of 30 0 of 30

@dayaffe
dayaffe requested a review from a team as a code owner October 5, 2026 18:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T18:00:43.877797Z b7c652b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dayaffe dayaffe changed the title Fix flaky tests and retry merge queue tests with backoff fix(CI): flaky tests and retry merge queue tests with backoff Oct 5, 2026

@pront pront left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good improvement that will reduce a lot of the flakey runs. One followup item worth looking into is if we can refactor tests and remove the need for timeouts.

Comment thread quickwit/quickwit-actors/src/mailbox.rs Outdated
let universe = Universe::with_accelerated_time();
let back_pressure_actor = BackPressureActor;
let back_pressure_actor = BackPressureActor {
queue_capacity: QueueCapacity::Bounded(1),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this test here to test that we keep track of backpressure and so increasing the queue capacity and asserting that backpressure = 0 defeats its entire purpose?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-read the test and you're correct, reverting this change.

@dayaffe
dayaffe requested a review from guilload October 7, 2026 18:19

This branch has not been deployed

No deployments
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.

4 participants