Skip to content

Commit cddd88c

Browse files
authored
ci(deploy): stabilize smoke tests with longer configurable backoffs (#628)
1 parent b893299 commit cddd88c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/.deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ jobs:
9999
env:
100100
FRONTEND_URL: https://${{ inputs.hostname }}
101101
REDIRECT_URL: https://${{ inputs.redirect_url }}
102+
SMOKE_MAX_RETRIES: "5"
103+
SMOKE_RETRY_DELAY: "5000"
104+
SMOKE_MAX_RETRY_DELAY: "40000"
102105
run: |
103106
npm ci
104107
npm run smoke

tests/src/smoke.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ const MAX_RETRIES = (() => {
2323
})();
2424

2525
const MIN_RETRY_DELAY_MS = 100;
26-
const MAX_RETRY_DELAY_MS = 30_000;
26+
const MAX_RETRY_DELAY_MS = (() => {
27+
const parsed = Number.parseInt(process.env.SMOKE_MAX_RETRY_DELAY ?? "30000", 10);
28+
if (Number.isFinite(parsed) && parsed >= MIN_RETRY_DELAY_MS) {
29+
return parsed;
30+
}
31+
return 30_000;
32+
})();
2733
const RETRY_DELAY_MS = (() => {
2834
const parsed = Number.parseInt(process.env.SMOKE_RETRY_DELAY ?? "1000", 10);
2935
if (!Number.isFinite(parsed) || parsed < MIN_RETRY_DELAY_MS) {

0 commit comments

Comments
 (0)