From 3c5edd99dbd5b104ec65a3eb1f692446f05b8993 Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Tue, 15 Sep 2026 17:56:32 +0900 Subject: [PATCH] fix(ci): stop reporting healthy dump runs as failed refresh-data: upload-artifact crashed with "Maximum call stack size exceeded" on the ~1M-file dump; it now uploads one tar.gz. dump-refresh: create-pull-request could fail with GitHub's "diff is taking too long to generate" after the PR already existed (TechAPI #180). That step now continues, and a follow-up fails the job only when no open PR exists for the branch. Refs #1 --- .github/workflows/dump-refresh.yml | 17 +++++++++++++++++ .github/workflows/refresh-data.yml | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dump-refresh.yml b/.github/workflows/dump-refresh.yml index a35019a..49183bc 100644 --- a/.github/workflows/dump-refresh.yml +++ b/.github/workflows/dump-refresh.yml @@ -85,7 +85,11 @@ jobs: if-no-files-found: ignore - name: Create dump-refresh PR + id: cpr if: env.TECHAPI_WRITE_TOKEN != '' + # A dump PR touches so many pages that GitHub may answer "diff is taking + # too long to generate" after the PR exists; the next step decides. + continue-on-error: true uses: peter-evans/create-pull-request@v6 with: path: ./techapi @@ -101,3 +105,16 @@ jobs: committer: TechEngineBot <289859915+TechEngineBot@users.noreply.github.com> author: TechEngineBot <289859915+TechEngineBot@users.noreply.github.com> delete-branch: true + + - name: Confirm dump-refresh PR exists + if: steps.cpr.outcome == 'failure' + env: + GH_TOKEN: ${{ env.TECHAPI_WRITE_TOKEN }} + BRANCH: dump-refresh/${{ steps.meta.outputs.date }} + run: | + n=$(gh api "repos/GetTechAPI/TechAPI/pulls?head=GetTechAPI:${BRANCH}&state=open" -q '.[0].number') + if [ -z "$n" ]; then + echo "::error::create-pull-request failed and no open PR exists for ${BRANCH}" + exit 1 + fi + echo "::warning::PR #${n} exists; the failure was GitHub's diff timeout on a large PR" diff --git a/.github/workflows/refresh-data.yml b/.github/workflows/refresh-data.yml index 85e1421..b39c137 100644 --- a/.github/workflows/refresh-data.yml +++ b/.github/workflows/refresh-data.yml @@ -43,11 +43,16 @@ jobs: TECHAPI_DATA_DIR: ${{ github.workspace }}/TechAPI/data run: python -m app.dump + # ~1M small files crash upload-artifact ("Maximum call stack size + # exceeded"); ship the dump as one archive instead. + - name: Pack static dump + run: tar -czf techapi-static-dump.tgz dump + - name: Upload static dump artifact uses: actions/upload-artifact@v4 with: name: techapi-static-dump - path: dump/ + path: techapi-static-dump.tgz # To serve a public static API, enable Pages and swap the step above for: # - uses: actions/upload-pages-artifact@v3