Skip to content

Commit f09e1e4

Browse files
committed
* wait when hit 500
* throw error when timedout
1 parent c60f50e commit f09e1e4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: fail if files changed
2626
run: |
2727
if ! git diff --quiet --exit-code ; then
28-
echo "Please run 'make build' and 'make Prettier' locally and commit the changes."
28+
echo "Please run 'make build' and 'make prettier' locally and commit the changes."
2929
exit 1
3030
fi
3131

src/releases.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ export async function pollForAirgapReleaseStatus(vendorPortalApi: VendorPortalAp
375375
if (err.statusCode >= 500) {
376376
// 5xx errors are likely transient, so we should retry
377377
console.debug(`Got HTTP error with status ${err.statusCode}, sleeping for ${sleeptimeMs / 1000} seconds`);
378+
await new Promise(f => setTimeout(f, sleeptimeMs));
378379
} else {
379380
console.debug(`Got HTTP error with status ${err.statusCode}, exiting`);
380381
throw err;
@@ -384,6 +385,7 @@ export async function pollForAirgapReleaseStatus(vendorPortalApi: VendorPortalAp
384385
}
385386
}
386387
}
388+
throw new Error(`Airgapped build release ${releaseSequence} did not reach status ${expectedStatus} in ${timeout} seconds`);
387389
}
388390

389391
async function getAirgapBuildRelease(vendorPortalApi: VendorPortalApi, appId: string, channelId: string, releaseSequence: number): Promise<Release> {

0 commit comments

Comments
 (0)