Skip to content

id(ci): name the playwright-e2e readiness timeout, dump server journal on timeout - #12580

Closed
dezren39 wants to merge 3 commits into
mainfrom
archer-lane-j/1374-playwright-readiness
Closed

dezren39 wants to merge 3 commits into
mainfrom
archer-lane-j/1374-playwright-readiness

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Refs #1374 — hardens the cross-VM readiness probes that PR #4667 added to pkgs/id/nix/tests/playwright-e2e-test.nix.

What was already true (verified, not re-done)

#4667 (merged 2026-11-10) fixed the original failure — the unretried client-side curl (nightly 40457980141, exit 7) — with server-side wait_for_unit/wait_for_open_port plus wait_until_succeeds retries for the four cross-VM probes. Criterion 1 of #1374 is met by it.

This slice

The four probes rode the test driver's implicit timeout, and a probe that never succeeded produced a bare failure with no server-side evidence in the log. This change:

  • Names the bound: SERVER_READY_TIMEOUT = 900 — the same 900s (15 min) the driver applies by default, so timing behaviour is unchanged, but the bound is now deliberate and tunable in one place (the issue's acceptance wording: "retried probe with a named timeout").
  • On timeout, before failing, the probe captures the server instance's journal (journalctl -u id-primary/id-secondary.service, last 100 lines) plus its listeners (ss -ltnp) and emits them into the test log via server.log(), so a readiness failure shows why the server did not answer. The failure is always re-raised; the dump only observes it and is itself best-effort.

Driver-1.x detail that shaped the code (found via a scratch VM run whose log had no dump, then confirmed in the pinned test-driver source): execute() returns its output and logs none of it — a dump issued through execute() alone never reaches the log. The capture must go through server.log(). || true guards are needed because execute runs under set -euo pipefail.

Oracle — both halves exercised

  1. Timeout path (GREEN, real VM run): scratch run 45045501390 carried a readiness-timeout-scratch check running this exact helper (20s bound, dead port). Its log contains:
    server: readiness timeout: http://server:4999/ never answered; demo-id.service journal and listeners follow:
    Nov 22 16:51:02 server systemd[1]: Started demo-id.service.
    Nov 22 16:51:02 server demo-id-start[507]: demo-id-server-started
    State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
    !!! RequestedAssertionFailed: action timed out after 42.72 seconds (timeout=20.0)
    
    (Scratch branch deleted after harvest; run page and the record on id(ci): nixos-playwright-e2e VM test fails on first curl — no server readiness wait (nightly 40457980141) #1374 remain.) A driver-faithful Python contract test of the helper also passes.
  2. Success path: nightly run 45036897652 dispatched on this branch under the raised 300-minute timeout (PR ci(id): raise the e2e nightly timeout from 90 to 300 minutes #12526) — its log must show the four probes proceeding past the first curl into the Playwright runs of nixos-playwright-e2e. The handler revisions after that dispatch touch only the failure path (dead code when probes succeed), so its evidence stands for the final head.

Criterion 2 of #1374 for main itself still awaits a completed nightly (the 2026-11-22 main dispatch was cancelled by a superseding run); this PR does not close #1374.

…l on timeout

The cross-VM readiness probes added by #4667 rode the test driver's
implicit wait_until_succeeds timeout and failed silently: a probe that
never succeeded reported only that curl kept failing. Give the bound a
name (SERVER_READY_TIMEOUT, same 900s the driver applied implicitly,
so timing behaviour is unchanged) and, on timeout, dump the server
instance's journal and listeners into the test log before failing, so
a readiness failure shows why the server did not answer.

Refs #1374
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 14:22
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 293b9a4a-4f4e-4604-b33f-4b9dc3a5dd5e
Commits

Reviewing files that changed from the base of the PR and between 666424e and 75108f0.

Files selected for processing: 1

  • pkgs/id/nix/tests/playwright-e2e-test.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 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-22T16:45:25.539747Z 75108f0 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 037efa04d6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)
except Exception:
try:
server.execute(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Log the diagnostic output returned by server.execute

When a cross-VM HTTP probe times out, this call discards all the diagnostics it collects. In the pinned NixOS test driver, execute captures stdout and returns (status, output) without logging it. Consequently, neither the readiness-timeout message nor the journal and listener dump appears in the test log, defeating the failure-diagnosis behavior this change adds. Capture the returned output and explicitly print it or pass it to server.log before re-raising the original exception.

Useful? React with 👍 / 👎.

Archer added 2 commits November 22, 2026 16:20
The test driver's RequestedAssertionFailed derives from BaseException
in the current driver, so the except-Exception handler added in the
previous commit never fired: a scratch VM run (readiness-timeout-
scratch check, dead port, 20s bound) timed out and failed with no
journal dump in the log. Catch BaseException in both the handler and
the best-effort guard around the dump; the failure is always
re-raised, the dump only observes it.

Refs #1374
Driver 1.x execute() returns (status, stdout) without logging any of
it, so the previous handler captured nothing visible: two scratch VM
runs timed out the probe and failed with no journal dump in the log.
Capture the dump from execute() and emit it through server.log(),
which is the driver's log primitive. The journal/ss commands get
'|| true' guards since execute runs under set -euo pipefail.

Refs #1374
@dezren39

Copy link
Copy Markdown
Member Author

Closing as superseded by PR #12581 (merged 2026-11-22T14:26:19Z, merge cd9e579c13, file commit 8dd806fb9b on main). — Lane J2 closeout, replacing the stalled Lane J.

While this PR sat open, a parallel slice for the same #1374 hardening landed on main. I compared the two implementations of pkgs/id/nix/tests/playwright-e2e-test.nix directly (branch head 75108f0 vs main 8dd806fb9b):

No code from this branch is being merged; nothing here is lost — the comparison and the two remainders are recorded on #1374.

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.

id(ci): nixos-playwright-e2e VM test fails on first curl — no server readiness wait (nightly 40457980141)

1 participant