Skip to content

MAINT: consolidate GPU workflow config, bump download-artifact to v21 - #54

Merged
mmcky merged 3 commits into
mainfrom
consolidate-workflow-config
Aug 5, 2026
Merged

MAINT: consolidate GPU workflow config, bump download-artifact to v21#54
mmcky merged 3 commits into
mainfrom
consolidate-workflow-config

Conversation

@mmcky

@mmcky mmcky commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Consolidates five open PRs into three commits. #51, #52 and #53 all rewrite the same few lines of ci.yml and collab.yml and conflict pairwise, so landing them separately would have needed two careful conflict resolutions where a careless "take theirs" silently drops spot=false. Doing it in one commit resolves that region once.

What changes

Change Replaces
1 runs-on: disk=largevolume=80gb, plus spot=false, on all four GPU workflows #51, #52
1 Explicit permissions: blocks so the default token can drop to read #53
2 dawidd6/action-download-artifact@v21 at all four call sites #50
3 -n added to the ci.yml PDF build #25 (partial)

The four runs-on strings now match lecture-jax and lecture-python.myst byte for byte, allowing for collab.yml's different image (ubuntu24-gpu-x64).

Notes on the judgement calls

actions: read on ci.yml and collab.yml. #53 declared this only on publish.yml, though all three run dawidd6/action-download-artifact. It turns out not to be load-bearing: lecture-jax's ci.yml runs that action green with contents: read and pull-requests: write alone, because public-repo tokens can read Actions data without the explicit scope. Added anyway — it is strictly additive, keeps the three files consistent, and removes the reliance on that behaviour.

v21 rather than dependabot's v14. v21 has roughly three months of soak against v14's one day, runs on node24 so it clears the Node 20 deprecation warning that v14 keeps, and is what lecture-jax already runs. The input surface this repo uses — workflow, branch, name, path — is unchanged across v3, v9, v14 and v21. One real behaviour change: allow_forks defaulted true in v3 and false from v9 on, so collab.yml does change. It is inert here because the step pins branch: main against an upstream workflow, so the runs being searched are never fork runs.

The -n flag. ci.yml's PDF build was the only jb build in that file without -n, while publish.yml runs the same pdflatex build with -n -W. That gap let a bad cross-reference or missing citation pass the PR check and then fail the tag-only publish build. cache.yml also builds HTML without -n; left alone deliberately, since that workflow is currently failing and tightening it is a separate change.

What this does not fix

CI stays red. Both repo-wide breakages are untouched by this PR and are being handled separately: the stale PyTorch nightly index in ci.yml's install step, and cache.yml being both auto-disabled for inactivity and failing during notebook execution, so the build-cache artifact every other workflow downloads has never existed.

Part of the rollout tracked in QuantEcon/meta#330, with the permissions work from QuantEcon/meta#347.

🤖 Generated with Claude Code

mmcky and others added 3 commits August 5, 2026 12:58
Lands three overlapping PRs as one commit, since #51, #52 and #53 all
rewrite the same few lines of ci.yml and collab.yml and conflict pairwise.

- runs-on: disk=large -> volume=80gb (the v3 label rename), and spot=false
  on all four GPU workflows. Final state now matches lecture-jax and
  lecture-python.myst byte for byte, allowing for collab.yml's different
  image (ubuntu24-gpu-x64).
- Explicit job-level permissions on ci.yml and collab.yml, and a top-level
  block on publish.yml, so the default workflow token can drop to read.

Both ci.yml and collab.yml gain `actions: read` alongside the permissions
block from #53, which declared it only on publish.yml. It is not currently
load-bearing -- lecture-jax runs dawidd6/action-download-artifact green with
contents+pull-requests alone, because public-repo tokens can read Actions
data regardless -- but declaring it keeps the three files consistent and
removes the reliance on that behaviour.

Replaces #51, #52 and #53. Part of the rollout tracked in
QuantEcon/meta#330, with the permissions work from QuantEcon/meta#347.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings all four call sites (ci, collab, linkcheck, publish) onto a single
version. collab.yml was still on v3 while the rest were on v9.

v21 over dependabot's v14 (#50): it has roughly three months of soak rather
than one day, runs on node24 so it clears the Node 20 deprecation warning
that v14 keeps, and matches what lecture-jax already runs green. The input
surface this repo uses -- workflow, branch, name, path -- is unchanged
across v3, v9, v14 and v21.

One behaviour change is worth recording: allow_forks defaulted true in v3
and false from v9 onward, so collab.yml's behaviour does change. It is inert
here because the step pins branch: main against an upstream workflow, so the
runs being searched are never fork runs.

Replaces #50, which dependabot will not update itself -- it has opened
nothing in this repo since 2026-02-02.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ci.yml's PDF build was the only `jb build` in the file without -n, while
publish.yml:53 runs the same pdflatex build with -n -W. That gap let a
nitpick-class error -- a bad cross-reference, unknown role or missing
citation in the PDF path -- pass the PR check and then fail the tag-only
publish build, where it is far more expensive to discover.

Salvaged from #25, which is otherwise superseded by 230e90c. The rest of
that PR is not carried forward: its bayes_nonconj.md edit is already on main
in better form, and its _build upload step lacks the `if: failure()` guard
its three siblings have.

Note cache.yml:36 still builds HTML without -n. Left alone deliberately --
that workflow is currently failing and tightening it is a separate change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 03:00
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for timely-seahorse-68815c ready!

Name Link
🔨 Latest commit 5901428
🔍 Latest deploy log https://app.netlify.com/projects/timely-seahorse-68815c/deploys/6a72a73b4dd2e00008499107
😎 Deploy Preview https://deploy-preview-54--timely-seahorse-68815c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates several workflow maintenance changes to standardize GPU runner configuration, tighten GitHub Actions token permissions, and modernize artifact download usage across the repository’s CI workflows.

Changes:

  • Standardize GPU runs-on labels across workflows (volume=80gb + spot=false).
  • Add explicit permissions: blocks (workflow/job level) to support lowering default GITHUB_TOKEN permissions.
  • Bump dawidd6/action-download-artifact call sites to @v21 and add -n to the ci.yml PDF build.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/publish.yml Adds workflow-level permissions, updates GPU runner label, and bumps artifact download action to v21.
.github/workflows/linkcheck.yml Bumps artifact download action to v21 (permissions likely need tightening too).
.github/workflows/collab.yml Updates GPU runner label, adds job permissions, and bumps artifact download action to v21.
.github/workflows/ci.yml Updates GPU runner label, adds job permissions, bumps artifact download action to v21, and makes PDF build nitpicky (-n).
.github/workflows/cache.yml Updates GPU runner label for the cache workflow.
Suppressed comments (1)

.github/workflows/cache.yml:13

  • actions/checkout is pinned to github.event.pull_request.head.sha, but this workflow only runs on schedule and workflow_dispatch (no pull_request payload). On those events the expression resolves to empty/undefined and can cause checkout to fail or fetch the wrong ref. Prefer default checkout behavior (or use github.sha) for scheduled/manual runs.
    runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb/spot=false"
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.event.pull_request.head.sha }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 29 to 33
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v9
uses: dawidd6/action-download-artifact@v21
with:
workflow: cache.yml
branch: main
mmcky added a commit that referenced this pull request Aug 6, 2026
#55)

Completes the hardening #54 landed for ci, collab and publish: the
dawidd6 cache download works today via public-repo API leniency, but
granting actions: read explicitly matches the documented requirement
and the blocks the other workflows now carry. Raised by Copilot on
the superseded #53.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants