Repository navigation
Keep the logging verifier alive while a health request is pending - #682
Merged
Merged
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
scripts/ci/verify-container-logging.mjscan 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
setTimeoutand clears it afterwards. A pending request is now always aborted after one second and the poll retries, as intended.Evidence
node:22-alpine: a pending operation that holds no handle, aborted byAbortSignal.timeout(1000), exits 13 with the same warning. The same operation aborted by a referenced timer rejects withAbortErrorand exits 0.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.