Repository navigation
test: retry vercel deploy on transient pre-deployment network errors - #100070
Conversation
Tests PassedCommit: 81261a8 |
935eda4 to
b6a16ff
Compare
Deploy-mode CI validationI fixed a typo in a comment in
Log excerpts from the regular job: What this shows: with the deploy retry wrapper applied, What it can't show: the retry only fires on a CLI |
Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
b6a16ff to
81261a8
Compare
Summary
This retries
vercel deploywhen it fails with a transient network error before the CLI reports a deployment. It is the third of three stacked PRs.Why. On v16.5.0-canary.6 attempt 1 (example),
vercel deployprintedError: fetch failedand no deployment URL. The harness failed straight away; the cause it reported was a misleadingInvalid URL.When it retries. All of these must hold:
vercel deployexits non-zero;Inspect/Preview/ProductionURL line;Error:line with a network failure:fetch failed,ECONNRESET,ETIMEDOUT,EAI_AGAIN,ECONNREFUSED,UND_ERR_SOCKET,UND_ERR_CONNECT_TIMEOUTorsocket hang up;Unauthorized,Forbidden,Build failed,Command "âĶ" exited, âĶ).Limits.
throwDeploymentErrorpath unchanged, with no extra deploy.Accepted risk. If the connection drops after Vercel accepted the upload, a retry can leave an orphaned preview deployment (the harness deploys with
--force). That's at most 2 extra previews per suite start in the test project. The retry log line says so and includes the CLI output.This PR also fixes a typo in a comment in
test/e2e/app-dir/resume-data-cache/resume-data-cache.test.ts. That change is there soTest new and changed tests when deployedruns a deploy-mode suite against the full stack.Verification
pnpm jest test/unit/next-deploy-failure: 43/43 pass.Inspectline (including ANSI-colored output), a build diagnostic that mentionsfetch failed, andUnauthorizednext tofetch failed.pnpm typescriptare clean.