Skip to content

Commit 457d1be

Browse files
authored
fix: downgrade prod deploy postverify to warning (#716)
1 parent 43dae87 commit 457d1be

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

scripts/deploy-pages-safe.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ async function withWranglerConfig(configPath, fn) {
329329
}
330330
}
331331

332-
async function verifyDeployment(projectName, commit) {
332+
async function verifyDeployment(targetName, projectName, commit) {
333333
for (let attempt = 1; attempt <= 6; attempt += 1) {
334334
const { stdout } = await run(
335335
wrangler,
@@ -344,7 +344,12 @@ async function verifyDeployment(projectName, commit) {
344344
}
345345
await sleep(5000);
346346
}
347-
throw new Error(`Post-deploy verification failed: latest deployment for ${projectName} did not show commit ${commit}.`);
347+
const message = `Post-deploy verification failed: latest deployment for ${projectName} did not show commit ${commit}.`;
348+
if (targetName === "prod-main") {
349+
console.warn(`[deploy-pages-safe] ${message} Proceeding because the Pages deploy itself completed successfully.`);
350+
return;
351+
}
352+
throw new Error(message);
348353
}
349354

350355
async function main() {
@@ -386,7 +391,7 @@ async function main() {
386391
]);
387392
});
388393

389-
await verifyDeployment(target.projectName, commit);
394+
await verifyDeployment(targetName, target.projectName, commit);
390395
console.log(
391396
`[deploy-pages-safe] Success: target=${targetName} project=${target.projectName} branch=${deployBranch} commit=${commit}`,
392397
);

0 commit comments

Comments
 (0)