Repository navigation
[vite-plugin] Skip remote bindings e2e tests on Windows - #12436
Conversation
Remote bindings tests are skipped on Windows due to slow/unreliable remote proxy session initialization times in CI, which causes intermittent timeout failures during Vite dev server startup. This change: - Adds a Windows platform check that skips all remote bindings tests - Removes redundant individual test skip conditions - Consolidates skip logic at the describe block level See: https://jira.cfdata.org/browse/DEVX-2030
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
| // On Windows the path for the miniflare dependency gets pretty long and this fails in node < 22.7 | ||
| // (see: https://github.com/shellscape/jsx-email/issues/225#issuecomment-2420567832), so | ||
| // we need to skip this on windows since in CI we're using node 20 | ||
| // we should look into re-enable this once we can move to a node a newer version of node |
There was a problem hiding this comment.
mh.... this comment is a bit useful, I think it is a bit of a shame to remove it as it could come in handy at some point... but it'd be a bit weird to move it up... 😓
There was a problem hiding this comment.
Node 20 support ends in April, so this will not be a problem soon-ish.
There was a problem hiding this comment.
In the long run, I would like to move away from testing remote-bindings e2e for most our our tools, since this is inherently flakey and I don't know how much value is being added by testing in miniflare, wrangler, and vite-plugin. In fact we moved a bunch of wrangler tests to mock out the remote binding bit and just test that wrangler sends the correct config to miniflare.
Fixes https://jira.cfdata.org/browse/DEVX-2030
Summary
Skip all vite-plugin remote bindings e2e tests on Windows due to slow/unreliable remote proxy session initialization times in CI, which causes intermittent timeout failures during Vite dev server startup.
Root Cause Analysis
The first Vite dev server startup with remote bindings is slower than subsequent runs because it creates a brand new
DevEnvinstance for each worker's remote proxy session. This involves:getPort()requireAuth()andrequireApiToken()calls/accounts/{id}/workers/subdomain/edge-previewOn Windows CI, these operations can take longer than the 20-second
waitForReadytimeout, causing intermittent test failures.Changes
test.skipIf(process.platform === "win32")conditionsTests
Public documentation