Skip to content

CI: Update to JuliaGPU Buildkite changes - #598

Closed
maleadt wants to merge 2 commits into
SciML:masterfrom
maleadt:tb/buildkite-relay
Closed

maleadt wants to merge 2 commits into
SciML:masterfrom
maleadt:tb/buildkite-relay

Conversation

@maleadt

@maleadt maleadt commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Because of continued attacks on our CI infrastructure, we are locking things down:

  • Buildkite no longer builds pull requests from forks. This PR restores that through the relay workflows, after a maintainer's approval: for each new commit, reload the PR, check that the head commit is the one you reviewed, and click Approve workflows to run. Buildkite then builds the commit as ci/pr-<N> and reports status on the PR as usual. PRs from branches of this repository are unaffected.

Repository admin:

  • In Settings → Actions → General, under Approval for running fork pull request workflows from contributors, select Require approval for all external contributors.

Maintainers, note:

  • If a fork PR changes .github/ or .buildkite/, push the changes to a branch of this repository to run Buildkite.
  • After merging this PR or any later change to .github/workflows/ on the default branch, click Update branch on each open fork PR so it can be built.

This is an automated, AI-assisted PR. Please check that everything works as intended before merging.

Fork PRs are no longer built directly on the GPU agents, which also no
longer decrypt secrets. Approved fork commits are pushed to ci/pr-<N> by
JuliaCI/buildkite-pr-relay and built from there.
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #598

Reviewed head: 384ccaf
Raw SHA-256: 1c34b5c07e41187ce188f958c3479b8234e1a7bcfbe44f4b56673c59a3bbfa7e
Source SHA-256: 3d80eb7c4be6cad93aa8acc4695a206da4c3f88e8ae4069f584f23a46e304d16
Source: standard-review-v1 (harness-log)
Reviewer session: 01a237fb-4d98-72c1-a0d8-a2f82b952a58
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H6)
  • Verdict: CHANGES
  • Reviewed head: 384ccaf

Review report

VERDICT: CHANGES
Round: 1
Head: 384ccaf
Base: 95d626c
Slot: 1
CI: CI is not green (regress:test (alldeps, lts, CPU) / Downgrade Tests - CPU)
Session: 01a237fb-4d98-72c1-a0d8-a2f82b952a58
Reviewer: codex-cli 0.172.0; model: gpt-6.2-sol
Review triage: {"families":["mutable-privileged-workflow-ref"],"nonblocking":["actionlint-runner-labels"],"contract":false}

Risk

high (H6: .github/workflows/BuildkiteApproval.yml defines the authorization signal for running fork code and .github/workflows/BuildkiteRelay.yml grants repository branch and status write permissions to the relay)

Blocking findings

  • Blocking priorities: P1

  • Must fix before merge: yes

  • [P1] [regression] .github/workflows/BuildkiteRelay.yml:18 delegates contents: write and statuses: write to the external workflow at @v2. The ref can resolve to different executor code while the reviewed DiffEqGPU commit stays fixed. That executor determines which fork commits get staged for Buildkite. The static probe found zero relay calls on base and rejected the named ref on head. It accepted a SHA-shaped control fixture. This is a blocker because the repository write grant needs to be tied to the executor revision the owner approves.

    Implementation fix. Pin jobs.relay.uses to the full commit SHA of the inspected JuliaCI workflow in .github/workflows/BuildkiteRelay.yml. Add a workflow lint assertion that rejects a named ref for the write-capable relay and accepts a full commit SHA. For hosted verification, use the pinned revision and assert that approval stages exactly the approved commit, a pending or cancelled replacement leaves the staging ref unchanged, and closing the PR allows the relay to remove the staging ref.

Non-blocking findings

  • [pre-existing] .github/workflows/Documentation.yml:17 and .github/workflows/GPU.yml:23. Issue title — Configure actionlint for the self-hosted GPU runner labels. Full workflow lint exited 1 on both snapshots and flagged the same two custom runner labels, gpu-v100 and gpu-t4.

    Implementation fix. Declare the two labels under self-hosted-runner.labels in .github/actionlint.yaml. Use repository-wide workflow lint as the regression check and assert that it exits 0 with both labels recognized.

What I ran

  • git diff --check on the pinned comparison exited 0. The diff adds two workflows. The checkout remained clean.
  • actionlint -oneline .github/workflows/BuildkiteApproval.yml .github/workflows/BuildkiteRelay.yml with actionlint 1.7.7 exited 0. Explicitly linting all workflow files on each snapshot exited 1 with the two pre-existing diagnostics above.
  • Ran the Ruby workflow probe on base and head. It verified that the head's approval job has empty token permissions and a single hosted no-op, that the relay matches the approval workflow name, and that it targets diffeqgpu-dot-jl without passing named secrets. The probe exited 0 on base, 1 on head at the ref check, and 0 with a synthetic full-SHA fixture.
  • GROUP=CPU julia +lts --startup-file=no --project=. -e 'using Pkg; Pkg.test()' ran on both snapshots using Julia 1.10.12, the supplied depot layers, and offline dependency resolution. The resolved manifests matched byte for byte. Both exited 0 with Testing DiffEqGPU tests passed and 4,166 of 4,166 reported assertions passing on each.
  • uv run --locked python --version printed Python 3.13.13 and warned that --locked has no effect outside a project. This checkout has no Python lockfile.

What I did not verify

  • Hosted fork approval, staging, status posting, and cleanup remain unverified. The caller delegates these operations to the reusable workflow and depends on the GitHub fork-approval settings and Buildkite pipeline configuration. The ROCm, oneAPI, and Metal Buildkite queues were unavailable on the build host. This authority change requires explicit owner approval.
  • The origin of the supplied CI failure remains unverified. The local CPU runs used the normally resolved dependency set. The hosted downgrade workflow uses a separate dependency setup.

AUTHOR_GRADE: {"task":"ci","score":3,"difficulty":3,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Both new workflows pass syntax lint and the CPU group passes on both snapshots. The relay grants repository write permissions through a named external ref, and hosted approval behavior remains unverified."}

Head link: 384ccaf


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a237fb-4d98-72c1-a0d8-a2f82b952a58 (no session URL)

Use the commit tagged v2.1.1 and check that the relay workflow
reference uses a full commit SHA in the QA group.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.172.0
Agent-Model: gpt-6.2-sol
Agent-Job: SciML__DiffEqGPU.jl__598--20261203T134037Z-codex-gpt-6.2-sol
Agent-Session: local session 01a23c22-c57e-7c71-834b-63d3ff752865 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

We don't need to pin that.

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Review · Changes requested · 78413305
Risk: high (H6)
Verdict: CHANGES

  • P1 · regression · Verify the approval gate before enabling the relay. The target has no GitHub-to-Buildkite relay. The head invokes a write-enabled reusable workflow after any completion of Buildkite approval and also invokes it on a schedule or by manual dispatch. The supplied snapshots lack the pinned workflow’s source and the repository’s fork-approval settings, so I could not verify that those paths require approval of the exact current commit. This is a verification …
Evidence and checks

PR: #598

Reviewed head: 7841330
Raw SHA-256: d09ab9436035552b9dabf784981e6aefeb366e8df4abf5bc8c616341aa3475ae
Source SHA-256: 51859e6eb4652479c1be017958e03ed62a2bc4111ff7416ebf3ee6aa266c3c23
Source: operator-attested-codex-v1 (runner attested by pankgeorg)
Reviewer session: 01a23db8-fbe0-7a20-8d8c-c41fe7a1837a
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=3)

Risk assessment

  • Risk: high (H6)
  • Verdict: CHANGES
  • Reviewed head: 7841330

Review report

VERDICT: CHANGES
PR: #598
Head: 7841330
Base: 95d626c
Reviewer: codex-cli 0.172.0 / gpt-6.2-sol
Session: 01a23db8-fbe0-7a20-8d8c-c41fe7a1837a

Risk

high (H6: The new relay can write repository branches and commit statuses and send fork commits to Buildkite agents.)

Blocking findings

  • P1 · regression · Verify the approval gate before enabling the relay. The target has no GitHub-to-Buildkite relay. The head invokes a write-enabled reusable workflow after any completion of Buildkite approval and also invokes it on a schedule or by manual dispatch. The supplied snapshots lack the pinned workflow’s source and the repository’s fork-approval settings, so I could not verify that those paths require approval of the exact current commit. This is a verification blocker. I did not reproduce an approval bypass. Before enabling the relay, inspect the pinned workflow and confirm the repository settings enforce the promised approval policy. Record a staging run showing that an unapproved fork commit produces no relay branch or build, that approval builds the exact SHA and reports status on it, and that pushing a new SHA requires fresh approval. Include scheduled and manual reconciliation in the negative checks. .github/workflows/BuildkiteRelay.yml:6 · .github/workflows/BuildkiteApproval.yml:7

Nonblocking findings

None

What I ran

  • diff -qr before head found exactly the four paths in changes.diff. git apply --check --directory=before changes.diff and git apply --reverse --check --directory=head changes.diff both passed. The patch changes no package API, numerical behavior, or existing GPU test logic.
  • Parsed both snapshots with python3 and PyYAML. The head passed static checks for the approval trigger, empty approval permissions, no-op step, relay event wiring, and diffeqgpu-dot-jl pipeline input. Both workflow files are absent on the target.
  • Ran the new test with julia --startup-file=no on Julia 1.13.4. It passed 1/1 on the head. Applying the same test to the target failed because the relay file is absent. The expected pin format is specified independently in the test. An in-memory change to the pipeline name still passed, confirming that the test does not check routing. test/qa/buildkite_relay.jl:4
  • Ran GROUP=QA julia --startup-file=no --project=<snapshot>/test <snapshot>/test/runtests.jl on both snapshots. Both initially stopped at the missing SafeTestsets dependency. I retried on temporary copies using the cached package via Pkg.develop(path=...). The head passed the new test through the QA entry point. Both snapshots then stopped during offline QA dependency resolution because Julia reported no usable registry.
  • Read ci.json with python3. The head reports successful approval, QA, CUDA, and benchmark checks. The record contains no relay or Buildkite backend result and no logs showing whether approval was manual. The benchmark entries supply no before-and-after measurements, and the patch makes no performance claim. Approval check · Head QA check · Target QA check

What I did not verify

  • Hosted GitHub dispatch, the pinned reusable workflow, branch creation and cleanup, exact-SHA status reporting, and Buildkite job pickup.
  • The full Aqua and JET QA suites. On this Linux ARM host, ls -la /dev/dri /dev/kfd /dev/nvidia0 found none of those device nodes. I did not exercise the CUDA, AMDGPU, oneAPI, or Metal hardware paths locally.

Head link: 7841330


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a23db8-fbe0-7a20-8d8c-c41fe7a1837a (no session URL)

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.

3 participants