Skip to content

fix(ci): fix breg timer log flake and nightly coverage target dir - #2618

Merged
jeremi merged 2 commits into
mainfrom
fix/breg-timer-log-flake
Nov 9, 2026
Merged

jeremi merged 2 commits into
mainfrom
fix/breg-timer-log-flake

Conversation

@jeremi

@jeremi jeremi commented Nov 9, 2026

Copy link
Copy Markdown
Member

Fixes two CI failures on main.

Flaky breg timer test. native_removed_timer_fences_a_predecessor_process_after_claim sometimes saw 0 record_timer.worker.iteration_failed lines. Readiness refuses as soon as the successor activation applies, while the predecessor worker is still parked in its checkpoint poll; the worker logs the fenced iteration only after it resumes, and the test crashed the replicas about 2 ms after unready. Removing the incidental delay reproduces the CI failure 3 of 3 times. The test now waits (bounded, 10 s) for that log line before the crash; assertions are unchanged. The same ordering exists twice in operator_retry_after_actual_exhaustion (warning written after the attempt commit that the test waits on), so those now wait for the line too. wait_for_log_code delegates to a new wait_for_log_code_count.

Nightly Rust coverage, failing since 23 Oct. The workflow set a relative CARGO_TARGET_DIR. Cargo runs tests from their crate directory, so the registry-rstack bootstrap tests, which create scratch space under CARGO_TARGET_DIR, pointed at a directory that does not exist and five of them failed every night in the developer-tools shard. The target dir is now ${{ github.workspace }}/target/nightly-rust-coverage, matching ci.yml; a regression test asserts it stays absolute.

Verification:

  • fixed breg test looped 30 times: 30 passed
  • postgres_record_timer_native (35 passed) and postgres_record_timer_operator (22 passed) with --test-threads=4
  • cargo fmt --all -- --check, cargo clippy --locked --all-targets -p registry-breg -p registry-bregctl -- -D warnings
  • test_nightly_rust_coverage (new test failed before the workflow change, passes after) and test_ci_changes; actionlint

Not verified: the two operator races did not reproduce in 5 runs (found by reading the code); the nightly fix is proven by the next scheduled run.

Readiness refuses as soon as the successor activation is applied, before
the parked predecessor worker leaves its checkpoint. The removed-timer
test then crashed the replica before the worker wrote its
record_timer.worker.iteration_failed line, so the log check saw no
fenced attempt. Wait for the line itself before the crash.

The operator retry journey has the same ordering: each warning follows
the commit that makes its attempt visible. Wait for the expected count
before stopping those replicas too.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Cargo runs tests from their crate directory, so the relative CARGO_TARGET_DIR sent the registry-rstack bootstrap tests to a scratch parent that does not exist and failed the developer-tools shard every night.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T06:44:08.742379Z bf351a7 PR opened
ℹ️ 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.

@jeremi
jeremi enabled auto-merge November 9, 2026 06:52
@jeremi
jeremi added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 2b0e852 Nov 9, 2026
60 checks passed
@jeremi
jeremi deleted the fix/breg-timer-log-flake branch November 9, 2026 07:23
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