Unverified Commit 27beaa23 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

[ci] Fix preview waiter type narrowing

Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent 1779cc06
...@@ -479,11 +479,14 @@ export async function waitForPreviewTarball({ ...@@ -479,11 +479,14 @@ export async function waitForPreviewTarball({
const producerDescription = `build-and-deploy run ${producerRun.runId} attempt ${producerRun.attempt}` const producerDescription = `build-and-deploy run ${producerRun.runId} attempt ${producerRun.attempt}`
if (producerRun.state === 'failure') { if (producerRun.state === 'failure') {
const failureKey = `${producerRun.runId}:${producerRun.attempt}` const failureKey = `${producerRun.runId}:${producerRun.attempt}`
if (producerFailureKey !== failureKey) { const failureObservedAt =
producerFailureKey = failureKey producerFailureKey === failureKey &&
producerFailureObservedAt = checkedAt producerFailureObservedAt !== null
} ? producerFailureObservedAt
deadline = producerFailureObservedAt + producerRetryGraceMs : checkedAt
producerFailureKey = failureKey
producerFailureObservedAt = failureObservedAt
deadline = failureObservedAt + producerRetryGraceMs
if (checkedAt >= deadline) { if (checkedAt >= deadline) {
throw new Error( throw new Error(
`Preview tarball for commit ${commitSha} was not published because ${producerDescription} ` + `Preview tarball for commit ${commitSha} was not published because ${producerDescription} ` +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment