test(deploy): guard upload retries, failures, and concurrency - #8525
netlify-coding[bot] wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughAdds integration tests for deploy uploads. The tests cover successful retries for files, functions, and edge functions; non-retryable HTTP 400 and 422 responses; retry-budget exhaustion; and concurrent uploads with results returned in input order. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The upload tests cover the described behaviors, including completion after outstanding uploads settle. No identified issue prevents merging after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📊 Benchmark resultsComparing with f5dc78a
|
commit: |
Opened by Netliloop run #203 (reduce-change-failure-risk)
Why
The upload unit tests stub the API and never consume file streams. All three still pass when retries drop a byte, permanent errors resolve successfully, the retry budget grows, concurrency becomes unlimited, or completion is reported early.
What changed
How we verified
CI=true npm run test:unit— 640 passed.npm exec vitest -- run tests/integration/commands/deploy/upload-files.test.ts tests/unit/utils/deploy/— 31 passed.npm run typecheckand focused ESLint/oxfmt checks — passed.deploy --json --no-build --dir publicthrough the TypeScript command entry — successful deploy JSON after two complete 262,181-byte upload attempts, with a 6,183 ms retry gap.What is left to test
Live Netlify API failure behavior is unverified; these tests deliberately supply controlled HTTP failures locally. The local command smoke bypasses the compiled launcher/update notifier; CI E2E jobs pass. No live deployment is needed to validate this test-only change.
Run the upload checks locally
Expected: 31 tests pass and all three quality checks exit successfully.
Risk
Low — test-only coverage can fail CI but cannot change production upload behavior.