From 6e955bdf3f988e800812b73a1f13252f8d601e2f Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 29 Jun 2026 21:28:08 +0530 Subject: [PATCH 1/2] ci(patch): download v14 baseline from GitHub release instead of frappe.io The Patch Test job intermittently failed on the "Download erpnext v14 backup" step with HTTP 403 Forbidden: frappe.io sits behind Cloudflare, and wget's default User-Agent gets flagged by bot protection on cache misses. This caused random failures across PRs that only a re-run would clear. Pull the fixed baseline from the v14-baseline GitHub release using the built-in token instead. Release assets are served from GitHub's CDN and authenticated from the runner, so no rate-limit roulette. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/patch.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 40fc667e3d9..24c767023a8 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -66,7 +66,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts # The v14 baseline backup is a fixed published file — cache it instead of re-downloading - # ~100MB from frappe.io every run. + # it from the GitHub release every run. - name: Cache erpnext v14 backup id: cache-v14 uses: actions/cache@v4 @@ -76,7 +76,9 @@ jobs: - name: Download erpnext v14 backup if: steps.cache-v14.outputs.cache-hit != 'true' - run: wget -O ~/erpnext-v14.sql.gz https://frappe.io/files/erpnext-v14.sql.gz + run: gh release download v14-baseline -R frappe/erpnext -p erpnext-v14.sql.gz -O ~/erpnext-v14.sql.gz + env: + GH_TOKEN: ${{ github.token }} - name: Cache pip uses: actions/cache@v4 From f645e513382a5934878f033ecef9ed3bc27fde27 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 29 Jun 2026 21:33:42 +0530 Subject: [PATCH 2/2] ci(patch): fetch v14 baseline from public release URL without a token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Greptile flagged that `gh release download` with `github.token` could be rejected for fork pull requests (token scoped to the fork, asset in frappe/erpnext). The release is public and published, so the asset is downloadable anonymously from objects.githubusercontent.com — drop the token and curl the public URL directly. Removes the cross-repo token dependency and keeps fork PRs working. Cloudflare is still bypassed since GitHub serves the asset, not frappe.io. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/patch.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 24c767023a8..83c2d7ff925 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -76,9 +76,10 @@ jobs: - name: Download erpnext v14 backup if: steps.cache-v14.outputs.cache-hit != 'true' - run: gh release download v14-baseline -R frappe/erpnext -p erpnext-v14.sql.gz -O ~/erpnext-v14.sql.gz - env: - GH_TOKEN: ${{ github.token }} + run: | + curl -fSL --retry 5 --retry-all-errors --retry-delay 5 \ + -o ~/erpnext-v14.sql.gz \ + https://github.com/frappe/erpnext/releases/download/v14-baseline/erpnext-v14.sql.gz - name: Cache pip uses: actions/cache@v4