From e15faad841eff7cec2c19ef333df67eeca09f98f Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Tue, 17 Nov 2026 21:52:19 -0300 Subject: [PATCH 1/2] CI: Restore baseline images from the dvc-cache artifact in the Docs workflow Port #9258 from tests.yml. Each Docs job spent 23-43 min pulling ~1200 baseline images from DagsHub, and two recent master runs were cancelled by the 45 min job timeout. Download the dvc-cache artifact first, then let `dvc pull` fetch only what it lacks. `dvc pull` also re-verifies the md5 of every cached object, which the old `dvc checkout --force` fallback did not. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docs.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e8eaae7996..12989766afc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -82,23 +82,18 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Pull baseline image data from dvc remote - id: dvc-pull + - name: Download DVC cache from GitHub Artifacts continue-on-error: true - run: | - dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local - dvc pull --remote origin --no-run-cache --force + run: gh run download -n dvc-cache -D .dvc/cache/ env: - DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} - - name: Download DVC cache from GitHub Artifacts and restore baseline image data - if: steps.dvc-pull.outcome == 'failure' + - name: Pull missing baseline image data from dvc remote run: | - rm -rf .dvc/cache/ - gh run download -n dvc-cache -D .dvc/cache/ - dvc checkout --force + dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local + dvc pull --remote origin --no-run-cache --force || dvc checkout --force env: - GH_TOKEN: ${{ github.token }} + DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }} - name: Configure GMT run: bash ci/config-gmt.sh From 325f25f4db36696a3df299c20c8727a6cde7c7b7 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Tue, 17 Nov 2026 22:48:38 -0300 Subject: [PATCH 2/2] CI: Restore baseline images from the dvc-cache artifact in DVC image diff Same pattern as #9258. The first `dvc pull` from DagsHub took 28-71 min in recent runs; the job now downloads the dvc-cache artifact (master's baselines) and `dvc pull` only fetches the PR's new or changed images. Add `actions: read`: the workflow declares explicit permissions, so the token had no Actions access and the old artifact fallback could never have downloaded anything. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/dvc-diff.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dvc-diff.yml b/.github/workflows/dvc-diff.yml index 021f7bcc5f5..0634d9509c4 100644 --- a/.github/workflows/dvc-diff.yml +++ b/.github/workflows/dvc-diff.yml @@ -15,6 +15,7 @@ on: - '**/*.dvc' permissions: + actions: read contents: read pull-requests: write @@ -33,22 +34,18 @@ jobs: - name: Setup data version control (DVC) uses: iterative/setup-dvc@v2 - - name: Pull baseline image data from dvc remote - id: dvc-pull + - name: Download DVC cache from GitHub Artifacts continue-on-error: true + run: gh run download -n dvc-cache -D .dvc/cache/ + env: + GH_TOKEN: ${{ github.token }} + + - name: Pull missing baseline image data from dvc remote env: DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }} run: | dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local - dvc pull --remote origin --no-run-cache || dvc pull --remote origin --no-run-cache - - - name: Download DVC cache from GitHub Artifacts and restore baseline image data - if: steps.dvc-pull.outcome == 'failure' - run: | - gh run download -n dvc-cache -D .dvc/cache/ - dvc checkout --force - env: - GH_TOKEN: ${{ github.token }} + dvc pull --remote origin --no-run-cache || dvc pull --remote origin --no-run-cache || dvc checkout --force - name: Setup continuous machine learning (CML) uses: iterative/setup-cml@v3