Skip to content

Keep the logging verifier alive while a health request is pending - #682

Merged
rmcdaniel merged 1 commit into
mainfrom
rust-325-logging-verifier-timer
Oct 22, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
rust-325-logging-verifier-timer

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Problem

scripts/ci/verify-container-logging.mjs can exit 13 ("Detected unsettled top-level await") before checking any role. PR #673's PHPUnit feature job 120103799105 failed this way: the image bootstrapped, then the verifier printed only the warning. A rerun of the same image passed all 8 roles (job 120123334693), so it is intermittent.

The health poll used AbortSignal.timeout(1000). That timer is unreferenced: it does not keep Node running. If a pending request holds no referenced handle (for example, a request on a reused keep-alive socket that is being closed), nothing keeps the event loop alive, and Node exits before the timeout fires.

Change

The poll aborts each request with a referenced setTimeout and clears it afterwards. A pending request is now always aborted after one second and the poll retries, as intended.

Evidence

  • Mechanism, in node:22-alpine: a pending operation that holds no handle, aborted by AbortSignal.timeout(1000), exits 13 with the same warning. The same operation aborted by a referenced timer rejects with AbortError and exits 0.
  • The fixed verifier passes locally against published Server 2.11.1 (ghcr.io/durable-workflow/server@sha256:bf8bed13…): Container logging acceptance: 8 PASS. Its containers and volume were removed.

This step runs only when a PR changes the Dockerfile or image inputs, so this PR's own CI does not exercise it.

AbortSignal.timeout's timer is unreferenced. When a pending health request
held no referenced handle, Node ended with an unsettled top-level await
(exit 13) before any role was checked, as in PR #673's job 120103799105.
A referenced timer always aborts the request, so the poll retries.
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 435fc02 into main Oct 22, 2026
14 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-logging-verifier-timer branch October 22, 2026 23:41
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