Repository navigation
Add Cloudflare Actions build regression coverage - #17137
alexanderniebuhr merged 4 commits into
Conversation
|
fkatsuhiro
left a comment
There was a problem hiding this comment.
@swaggysnippets san
Thank you for your PR!
But it seems there aren't changeset file. Could you add in this PR? To explain user what we changed. Thank you.
Oh, sorry. This PR for improve testing. I approgise my missunderstanding... |
|
@swaggysnippets thanks for your PR, which discovered a real missing test. However I have reviewed it and found that it doesn't technically solves your described gap. I still want to use this PR to get this merged, so I updated the branch for you. What changed
|
The actions-build fixture test could not fail when the withastro#16961 guard was reverted: it pinned prerenderEnvironment 'node' (skipping the default workerd prerender path), its second build was a pure optimizer cache hit rather than a stale-cache scenario, and its assertions never touched Actions output. Replace it with a unit test that invokes the adapter's astro:config:setup hook directly and asserts both observable effects of the isTypeGenPhase guard: configureServer is stripped from the Cloudflare Vite plugins and dependency discovery is disabled for every environment during build/sync, while dev keeps both. Verified the new test fails when the guard is neutered to sync-only or removed. Restore buildWithRetry: the stale-prebundle race it guards (withastro#14821) was never root-caused or fixed, and the suite runs all 49 files serially in one process with no CI-level retry to absorb a flake.
79a5906 to
f7f3caa
Compare
What changed
Why
Astro issue #16933 reported Cloudflare builds failing when
src/actions/index.tswas present because dependency optimization could observe a stale prebundle. The runtime startup change in #16961 addressed the production failure; this PR adds deterministic regression coverage so that behavior remains protected and optimizer races fail visibly instead of being hidden by retries.Validation