From 98309fa23976cc4bea81e44cfbaaab094f1fff31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=AE=E9=9B=A8?= Date: Fri, 24 Jul 2026 18:42:05 +0800 Subject: [PATCH] fix(ci): increase npm CDN propagation timeout with incremental backoff npm registry behind CDN can take 1-5 minutes for dist-tag to propagate to edge nodes. Extend max attempts from 12 to 60 and use incremental backoff: 5s for first 12 attempts, then 10s. --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a61e8c66..96944724 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1867,7 +1867,7 @@ jobs: set -eu . ./scripts/release/release-lib.sh attempt=1 - max_attempts=12 + max_attempts=60 while :; do delivered="$(npm view dingtalk-workspace-cli "dist-tags.$NPM_TAG" \ --registry=https://registry.npmjs.org --prefer-online)" @@ -1885,7 +1885,12 @@ jobs: exit 1 fi echo "npm $NPM_TAG still reports older v$delivered; waiting for registry propagation ($attempt/$max_attempts)." - sleep 5 + # incremental backoff: 5s for first 12 attempts (1 min), then 10s + if [ "$attempt" -lt 12 ]; then + sleep 5 + else + sleep 10 + fi attempt=$((attempt + 1)) done