diff --git a/.github/workflows/desktop-package.yml b/.github/workflows/desktop-package.yml index ce8929993e..50e7bdf341 100644 --- a/.github/workflows/desktop-package.yml +++ b/.github/workflows/desktop-package.yml @@ -957,7 +957,11 @@ jobs: --clobber # A successful HTTP response can still contain the previous CDN object. # Retry content validation as well as transport failures after replacement. - for attempt in {1..12}; do + # GitHub's release CDN can take several minutes to converge after a + # clobber, so keep the failure bound at five minutes instead of + # treating a transient stale object as a failed release. + max_readback_attempts=60 + for ((attempt = 1; attempt <= max_readback_attempts; attempt++)); do if curl -fsSL --max-time 30 \ "https://github.com/${GITHUB_REPOSITORY}/releases/download/channel-v1-beta/latest-v1.json" \ -o channel-v1-beta.published.json && \ @@ -966,8 +970,8 @@ jobs: echo "Beta channel manifest verified: ${CANDIDATE_VERSION}" exit 0 fi - echo "Beta channel manifest is not ready (attempt ${attempt}/12)." - if [[ "${attempt}" -lt 12 ]]; then sleep 5; fi + echo "Beta channel manifest is not ready (attempt ${attempt}/${max_readback_attempts})." + if [[ "${attempt}" -lt "${max_readback_attempts}" ]]; then sleep 5; fi done echo "Beta channel manifest did not converge to ${CANDIDATE_VERSION}." >&2 exit 1 diff --git a/scripts/check-github-config.test.mjs b/scripts/check-github-config.test.mjs index de213f6491..280733ddcc 100644 --- a/scripts/check-github-config.test.mjs +++ b/scripts/check-github-config.test.mjs @@ -1437,7 +1437,7 @@ fs.writeFileSync(output, content); }); assert.equal(result.status, scenario === 'stale' ? 1 : 0, `${scenario}: ${result.stderr}`); const requests = Number(readFileSync(path.join(cwd, 'requests'), 'utf8')); - assert.ok(requests > 1 && requests <= 12, `${scenario}: bounded content retries`); + assert.ok(requests > 1 && requests <= 60, `${scenario}: bounded content retries`); if (scenario === 'stale') assert.match(result.stderr, /did not converge/); } });