From e586d5f09febf3f1b8d1c6c99957598940bc1550 Mon Sep 17 00:00:00 2001 From: maruson08 Date: Fri, 25 Sep 2026 23:51:37 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8[Hotfix]=20Tolerate=20Cloudflare=20?= =?UTF-8?q?alias=20propagation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/deploy-cloudflare-bridge.yml | 22 +++++++++++++++---- tests/cloudflare-bridge.test.mjs | 7 ++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-cloudflare-bridge.yml b/.github/workflows/deploy-cloudflare-bridge.yml index 29e1cf4..c40a91b 100644 --- a/.github/workflows/deploy-cloudflare-bridge.yml +++ b/.github/workflows/deploy-cloudflare-bridge.yml @@ -141,8 +141,22 @@ jobs: DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }} run: node tests/deployment-smoke.mjs "$DEPLOYMENT_URL" noindex - - name: Validate stable bridge alias - run: node tests/deployment-smoke.mjs https://secure-tools-web-bridge.pages.dev noindex + - name: Validate stable deployment aliases + shell: bash + run: | + smoke_with_retry() { + local url="$1" + local indexing="$2" + + for attempt in 1 2 3 4 5 6; do + if node tests/deployment-smoke.mjs "$url" "$indexing"; then + return 0 + fi + [[ "$attempt" -lt 6 ]] || return 1 + echo "Waiting for Cloudflare alias propagation (attempt $attempt of 6)." + sleep 10 + done + } - - name: Validate tools custom domain - run: node tests/deployment-smoke.mjs https://tools.securetools.app indexable + smoke_with_retry https://secure-tools-web-bridge.pages.dev noindex + smoke_with_retry https://tools.securetools.app indexable diff --git a/tests/cloudflare-bridge.test.mjs b/tests/cloudflare-bridge.test.mjs index 4935fb3..54e91e9 100644 --- a/tests/cloudflare-bridge.test.mjs +++ b/tests/cloudflare-bridge.test.mjs @@ -29,8 +29,11 @@ assert.match(workflow, /\[\[ ! -e "\$BRIDGE_DIRECTORY\/_redirects" \]\]/); assert.match(workflow, /find "\$BRIDGE_DIRECTORY" -name index\.html -type f \| wc -l\)" -eq 20/); assert.doesNotMatch(workflow, /securetools\.app\/tools/); assert.match(workflow, /node tests\/deployment-smoke\.mjs "\$DEPLOYMENT_URL" noindex/); -assert.match(workflow, /node tests\/deployment-smoke\.mjs https:\/\/secure-tools-web-bridge\.pages\.dev noindex/); -assert.match(workflow, /node tests\/deployment-smoke\.mjs https:\/\/tools\.securetools\.app indexable/); +assert.match(workflow, /smoke_with_retry https:\/\/secure-tools-web-bridge\.pages\.dev noindex/); +assert.match(workflow, /smoke_with_retry https:\/\/tools\.securetools\.app indexable/); +assert.match(workflow, /for attempt in 1 2 3 4 5 6;/); +assert.match(workflow, /Waiting for Cloudflare alias propagation/); +assert.match(workflow, /sleep 10/); assert.doesNotMatch(workflow, /node tests\/deployment-smoke\.mjs https:\/\/securetools\.app/); const deploymentSmoke = fs.readFileSync("tests/deployment-smoke.mjs", "utf8");