[cd] Retry preview tarball uploads with backoff and richer diagnostics (#99060)
The `upload-preview-tarballs` workflow aborted its entire run when a single tarball upload hit a transient network error, and the logged error did not identify which package or request had failed. One observed run failed with `TypeError: fetch failed` (`UND_ERR_SOCKET`) after the ~78MB `next` tarball body had been written but before the response arrived (e.g. https://github.com/vercel/next.js/actions/runs/35721116824/job/106724007428#step:4:19). `scripts/upload-preview-tarballs.js` now wraps each package's upload in a retry with exponential backoff (5 attempts, 1s/2s/4s/8s). Every failure is retried, including network-level rejections without an HTTP status. Error messages now name the package and the failed request phase, and non-OK responses include a truncated response body alongside the status and response headers such as `x-vercel-id`, so the next rare failure is actionable. A package that exhausts its retries no longer aborts the remaining uploads; all failures are collected and reported at the end as an `AggregateError`. Co-authored-by:Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment