From 495ef3f76f98c7b9668def1dcc321f732b2fe760 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim <219906144+aibrahim-oai@users.noreply.github.com> Date: Sat, 14 Mar 2026 08:10:01 +0000 Subject: [PATCH] Expose nextest failure tail in CI Co-authored-by: Codex --- .codex/flaky-test-triage.md | 1 + .github/workflows/rust-ci.yml | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.codex/flaky-test-triage.md b/.codex/flaky-test-triage.md index e7a1e18729..d7838f536a 100644 --- a/.codex/flaky-test-triage.md +++ b/.codex/flaky-test-triage.md @@ -78,3 +78,4 @@ Older failures also appeared on Linux, but the repeated cross-PR signal is stron | `c3b8a0ebf` | Correct Windows popup selection assertions | full pass | Full PR CI passed on run `23081835533`, including both Windows `Tests` jobs and Bazel. The Windows-only initial-selection assertions now expect `Read Only` when the unelevated popup opens on Windows. This restarts the passing streak at 1 of 5 after the intervening failed commits. | | `9835ec89d` | Record validation pass 1 | full pass | Full PR CI passed on run `23082212165`, including the rerun of `Tests — windows-arm64 - aarch64-pc-windows-msvc` on job `67054619213`. The branch now has 2 consecutive full-suite green commits after `c3b8a0ebf`. | | `b6e18d2e8` | Record validation pass 2 | failed | Run `23083106021` isolated a new failure in `Tests — ubuntu-24.04 - x86_64-unknown-linux-gnu` while both Windows `Tests` jobs and all Bazel/lint checks passed. The GitHub CLI log download hit EOFs on both `results-receiver.actions.githubusercontent.com` and the signed Azure blob URL again, so the follow-up commit adds CI annotations and step-summary output for parsed nextest `FAIL`/`LEAK` lines. | +| `761363008` | Annotate nextest failures in CI | failed | Run `23083522224` flipped to a new `Tests — windows-x64 - x86_64-pc-windows-msvc` failure while `Tests — windows-arm64 - aarch64-pc-windows-msvc` and every non-test job passed. The new annotations proved this failure did not emit a parsable nextest `FAIL`/`LEAK` line, so the next follow-up extends the annotations to the last 80 log lines and requests explicit final failure output from nextest. | diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 0e1cff3773..6fde4efea0 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -629,13 +629,35 @@ jobs: tail -n 200 "$log_file" echo '```' } >> "$GITHUB_STEP_SUMMARY" - echo "::error::nextest failed without a parsable FAIL/LEAK line; inspect the tail in the step summary" + echo "::error::nextest failed without a parsable FAIL/LEAK line; the last 80 log lines were emitted as annotations" + + mapfile -t tail_lines < <(tail -n 80 "$log_file") + chunk="" + chunk_index=1 + for i in "${!tail_lines[@]}"; do + line=${tail_lines[$i]//%/%25} + line=${line//$'\r'/%0D} + line=${line//$'\n'/%0A} + if [[ -n "$chunk" ]]; then + chunk="${chunk}%0A${line}" + else + chunk="$line" + fi + + if (( (i + 1) % 10 == 0 || i + 1 == ${#tail_lines[@]} )); then + echo "::error title=nextest failure tail ${chunk_index}::$chunk" + chunk="" + ((chunk_index++)) + fi + done fi fi exit $status env: RUST_BACKTRACE: 1 + NEXTEST_FAILURE_OUTPUT: final + NEXTEST_FINAL_STATUS_LEVEL: fail NEXTEST_STATUS_LEVEL: leak - name: Upload Cargo timings (nextest)