Skip to content

Commit 4c393c9

Browse files
authored
Merge pull request #3266 from wgqqqqq/wgq/fix-release-beta-readback-1.0.3
fix(ci): extend beta channel manifest convergence window
2 parents 4a0ce69 + 14b66ef commit 4c393c9

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎.github/workflows/desktop-package.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,11 @@ jobs:
957957
--clobber
958958
# A successful HTTP response can still contain the previous CDN object.
959959
# Retry content validation as well as transport failures after replacement.
960-
for attempt in {1..12}; do
960+
# GitHub's release CDN can take several minutes to converge after a
961+
# clobber, so keep the failure bound at five minutes instead of
962+
# treating a transient stale object as a failed release.
963+
max_readback_attempts=60
964+
for ((attempt = 1; attempt <= max_readback_attempts; attempt++)); do
961965
if curl -fsSL --max-time 30 \
962966
"https://github.com/${GITHUB_REPOSITORY}/releases/download/channel-v1-beta/latest-v1.json" \
963967
-o channel-v1-beta.published.json && \
@@ -966,8 +970,8 @@ jobs:
966970
echo "Beta channel manifest verified: ${CANDIDATE_VERSION}"
967971
exit 0
968972
fi
969-
echo "Beta channel manifest is not ready (attempt ${attempt}/12)."
970-
if [[ "${attempt}" -lt 12 ]]; then sleep 5; fi
973+
echo "Beta channel manifest is not ready (attempt ${attempt}/${max_readback_attempts})."
974+
if [[ "${attempt}" -lt "${max_readback_attempts}" ]]; then sleep 5; fi
971975
done
972976
echo "Beta channel manifest did not converge to ${CANDIDATE_VERSION}." >&2
973977
exit 1

‎scripts/check-github-config.test.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ fs.writeFileSync(output, content);
14371437
});
14381438
assert.equal(result.status, scenario === 'stale' ? 1 : 0, `${scenario}: ${result.stderr}`);
14391439
const requests = Number(readFileSync(path.join(cwd, 'requests'), 'utf8'));
1440-
assert.ok(requests > 1 && requests <= 12, `${scenario}: bounded content retries`);
1440+
assert.ok(requests > 1 && requests <= 60, `${scenario}: bounded content retries`);
14411441
if (scenario === 'stale') assert.match(result.stderr, /did not converge/);
14421442
}
14431443
});

0 commit comments

Comments
 (0)