Give Cloudflare test polls a 10 s limit - #60
Merged
Merged
Conversation
The Cloudflare tests wait for durable work with expect.poll, and 23 of its 24 calls used the Vitest default limit of 1 s. The retry failure envelope needs five alarm-driven delivery attempts and a callback turn. In CI run 36884020000, attempt 1, every Cloudflare test file ran 5 to 12 times slower than usual, and that chain took more than 1 s. Set a 10 s poll limit for the whole Cloudflare suite. A poll still returns as soon as its condition holds, and a lost callback still fails with the poll error before the 15 s test timeout.
|
pnpm audit --audit-level=high fails on main since two high Undici advisories were published: a WebSocket subprotocol denial of service and a TLS certificate validation bypass. Both reach this repository only through Miniflare in the Cloudflare development tooling. Override Undici 7.29.0 with the patched 7.29.1 release, the same change as e128a95 on feat/portable-observability. That branch also records the patch in the changelog, so this commit does not.
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.
Summary
delivers the complete failure envelope for 'retry'intest/cloudflare/effect-payloads.test.tsfailed in CI run 36884020000, attempt 1 (PR #59, head 295b908). The poll failed withMatcher did not succeed in timeafter the received list stayed[]. Attempt 2 of the same run passed, and the push run on the same commit passed.Cause: the Cloudflare tests wait for durable work with
expect.poll. Of the 24 polls intest/cloudflare, 23 used the Vitest default limit of 1 s. The retry case needs five alarm-driven delivery attempts and a callback turn. In the failed attempt, every Cloudflare test file ran 5 to 12 times slower than usual, so that chain took more than 1 s:The engine is not at fault. The same file also ran slowly before this change, for example 4.3 s on
main(8d8140e) and 10.0 s onfeat/result-lookup(2c9dd13).Fix: set
expect.poll.timeoutto 10 s for the whole Cloudflare suite invitest.cloudflare.config.ts. A poll still returns as soon as its condition holds, so a normal run does not take longer. The 15 s test timeout and the explicit 15 s poll inrecovery.test.tsdo not change.Undici audit fix
The first CI run of this PR failed at
pnpm audit --audit-level=high, not at a test. Two high Undici advisories (WebSocket subprotocol denial of service, TLS certificate validation bypass) now affectundici >=7.0.0 <7.29.1, which reaches this repository only through Miniflare.mainlast ran CI on September 23, before the advisories, somainfails this audit too.48aec85 overrides
[email protected]with7.29.1inpnpm-workspace.yamland the lockfile. This is the same change as e128a95 onfeat/portable-observability(#59). #59 also records it in the changelog, so this PR does not; a second entry would conflict when #59 merges.Compatibility
Test configuration and a development-tooling dependency override only. No runtime, API, or published package effect. Not applicable to the Ruby gem, which has no Cloudflare backend.
Validation
test/cloudflare/worker.tscopies a slow runner. With the default limit, the test fails withMatcher did not succeed in timeafter 1052 ms. With the 10 s limit, it passes in 1365 ms. Both results are onmainand on PR Align observability and runtime contracts #59's head.Matcher did not succeed in timeafter 10037 ms, before the 15 s test timeout.pnpm run test:cloudflare: 58 passed onmain; 59 passed three times on PR Align observability and runtime contracts #59's head.pnpm run checkandprettier --checkpass.pnpm audit --audit-level=highexits 1 with the same two high Undici advisories as CI. With the override, it reports no high vulnerabilities.pnpm install --frozen-lockfile,format:check,check,build,test:cloudflare(59 passed),check:cloudflare, andpnpm test(528 passed, 32 skipped) pass.