Skip to content

fix: assorted testing reliability fixes#6895

Open
jaredm563 wants to merge 14 commits intomainfrom
getextensions-add-retries-for-network-errors
Open

fix: assorted testing reliability fixes#6895
jaredm563 wants to merge 14 commits intomainfrom
getextensions-add-retries-for-network-errors

Conversation

@jaredm563
Copy link

@jaredm563 jaredm563 commented Jan 23, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Testing fixes. No ticket/linear issue but these changes were prompted from discussions about CLI here:
https://netlify.slack.com/archives/C096B91TE03/p1769180475717899
https://netlify.slack.com/archives/C096B91TE03/p1769124255667039

Fix #1:
Changed test() to test.serial() for the "build plugins can manipulate netlifyToml.edge_functions array" test.

Both the default and tarball tests were running concurrently and writing to the same fixture directory :-/ this was causing some seemingly random failures since one test's bundle files would be overwritten by the other.

Fix #2:
Increased SERVER_POLL_TIMEOUT from 10s to 30s. The Deno server spinning up time in CI can be slower due to limited resources, causing the waitForServer() polling to timeout before the server is ready. This was causing flaky failures in server.test.ts.

Fix #3:
Added caching for downloaded Deno binaries (~/.netlify/deno-cli and ~/.netlify/deno-cli-v1) in the CI workflow
This is to prevent re-downloading Deno binaries on every CI run
Cache key includes a hash of bridge.ts to automatically invalidate when version changes.

Fix #4: Network Error Retries
Added p-retry dependency to netlify/config for retrying extension fetching on transient network errors. Follows existing pattern from packages/edge-bundler/node/downloader.test.ts which uses p-retry with vi.mock() to speed up retry tests by reducing timeouts from seconds to milliseconds.

For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@jaredm563 jaredm563 requested a review from a team as a code owner January 23, 2026 20:30
@github-actions
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@jaredm563 jaredm563 force-pushed the getextensions-add-retries-for-network-errors branch from 8f75c53 to 6aacbaa Compare January 24, 2026 01:22
@jaredm563 jaredm563 force-pushed the getextensions-add-retries-for-network-errors branch from 6aacbaa to 250dfc0 Compare January 24, 2026 01:38
@jaredm563 jaredm563 force-pushed the getextensions-add-retries-for-network-errors branch from 9d2571b to 8390726 Compare January 24, 2026 02:03
@jaredm563 jaredm563 changed the title fix: add retry logic with exponential backoff for extension fetching test: assorted test fixes Jan 24, 2026
@jaredm563 jaredm563 force-pushed the getextensions-add-retries-for-network-errors branch from 7f4ab11 to 40f477b Compare January 24, 2026 02:57
@jaredm563 jaredm563 changed the title test: assorted test fixes Fix: assorted test fixes Jan 24, 2026
@jaredm563 jaredm563 changed the title Fix: assorted test fixes Test: assorted test fixes Jan 24, 2026
@jaredm563 jaredm563 changed the title Test: assorted test fixes test: assorted test fixes Jan 24, 2026
@jaredm563 jaredm563 changed the title test: assorted test fixes test: assorted test fixes Jan 24, 2026
Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great finds! I have some thoughts/questions inline

@jaredm563 jaredm563 changed the title test: assorted test fixes fix: Some assorted testing reliability fixes Jan 28, 2026
@jaredm563 jaredm563 changed the title fix: Some assorted testing reliability fixes Fix: assorted testing reliability fixes Jan 28, 2026
@jaredm563 jaredm563 force-pushed the getextensions-add-retries-for-network-errors branch from c95ce28 to ab778ea Compare February 2, 2026 02:56
@jaredm563 jaredm563 changed the title Fix: assorted testing reliability fixes fix: assorted testing reliability fixes Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants