Skip to content

ci(nextest): print the output of a failed attempt that a retry then passes - #2520

Merged
vieiralucas merged 1 commit into
mainfrom
ci/nextest-show-retried-failures
Sep 14, 2026
Merged

vieiralucas merged 1 commit into
mainfrom
ci/nextest-show-retried-failures

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Summary

The ci nextest profile uses status-level = "fail", so a test that fails and then passes on retry leaves only a FLAKY 2/3 line. The failed attempt's panic and output are never printed, so the flake can't be diagnosed from CI and just gets retried again.

That is how the Batch, EC2 and CodeBuild image-pull flakes (#2516, #2519) went unexplained for weeks, and it is what blocks diagnosing the ones still open, e.g. cloudfront_test_function::test_function_throw_populates_error_message (4 retries in the last 26 E2E runs, not reproducible locally).

status-level = "retry" prints each failed attempt with its output (failure-output = "immediate-final" already applies), then RETRY 2/3 and the passing attempt. Runs with no failed attempts print exactly what they do today, so log volume only grows when something actually failed.

Used by the E2E and Conformance workflows (nextest run -P ci).

Test plan

  • Verified with nextest 0.9.101 on a scratch crate whose test fails once: with this profile the output shows TRY 1 FAIL, the attempt's stderr including the panic message, RETRY 2/3, TRY 2 PASS, and the FLAKY 2/3 summary. With status-level = "fail" only the FLAKY 2/3 summary line appears.
  • No code change; CI on this PR exercises the profile.

Summary by cubic

Changes the CI nextest profile to use status-level = "retry" so a test that fails but passes on retry prints the failed attempt's output instead of leaving only a FLAKY 2/3 line. This makes flakes diagnosable from CI logs without needing to reproduce them locally. Runs with no failed attempts are unchanged; log volume only grows when something actually fails.

Written for commit b4409ba. Summary will update on new commits.

Review in cubic

…asses

With status-level = "fail", a test that fails and passes on retry reports
only FLAKY 2/3, so the reason for the failed attempt is lost. Retries hid
the batch/EC2/CodeBuild image-pull flakes for weeks this way. Show retried
failures, with their output, so each flake names its cause the first time
it happens.
@vieiralucas
vieiralucas merged commit 57fb4b8 into main Sep 14, 2026
146 checks passed
@vieiralucas
vieiralucas deleted the ci/nextest-show-retried-failures branch September 14, 2026 00:16
Sorttech pushed a commit to Sorttech/fakecloud that referenced this pull request Sep 24, 2026
… time

TestFunction and TestConnectionFunction ran the handler on a worker thread
and failed it with "function execution exceeded the 250ms time limit" when
the thread had not answered within 250ms of wall-clock time, counting thread
spawn, runtime setup and any time the host spent not running the thread.
On a loaded CI runner a trivial echo handler hit that limit: the
cloudfront_test_function e2e tests needed a retry in 4 of the last 26 E2E
runs, and nextest's retried-failure output (faiscadev#2520) captured the error on
test_function_echoes_request.

Real CloudFront Functions are bounded by compute (~1ms of CPU per request),
not elapsed time. The worker now measures its own CPU time
(CLOCK_THREAD_CPUTIME_ID; elapsed time where the platform has no thread CPU
clock) and a run that used more than 250ms of it fails with the same error,
keeping whatever it logged. ComputeUtilization is derived from that CPU time
too. The caller's recv_timeout becomes a 10s wall-clock safety net for a run
that never returns. boa's loop and recursion caps still stop `while(1){}`.
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