Repository navigation
[ROCm][CI] Cache only a ROCm stack the PR's CI pushed itself - #65957
AndreasKaratzas merged 6 commits into
Conversation
|
Documentation preview: https://vllm--65957.org.readthedocs.build/en/65957/ |
A PR build reuses rocm/vllm-dev:pr<N>-stack-<key> when the tag exists, and other PRs' CI can push that tag first, since the key is public. build.sh now records the stack pair for /ci rocm cache under rocm-rocm-stack-built only when the build pushed it. The bot takes the latest build of the PR that recorded it, matched by its pull request rather than by github-pr-number metadata, which jobs can write. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
8a55e60 to
966b36e
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #100328 for commit |
mawong-amd
left a comment
There was a problem hiding this comment.
The built-only marker and use of Buildkite’s authoritative PR association are useful improvements. I have three focused requests:
1. Preserve recipe compatibility when selecting older commits.
The current check compares main against source["commit"], but does not compare that source against pr["head"]["sha"]. A stack built with main’s recipe can therefore remain eligible after the current PR head changes build.sh or the bake recipe. That doesn’t match the refusal message directing a changed recipe to /ci rocm nocache.
Please retain the main/source check, but also establish the intended historical-source/current-head compatibility rule. For example, if current-head recipe identity is required:
- An older build remains eligible after later commits that keep the recipe unchanged.
- A later head that changes the recipe follows the documented refusal path.
If validation is intentionally only about the selected artifact’s recipe, please make that explicit in the policy/message so current-head changes aren’t handled inconsistently.
2. Make candidate discovery complete.
list_builds fetches only the first 100 results, so a long-lived PR’s valid older source may disappear behind newer runs. The source query also tries only head.label or head.ref, while handle_cancel_ci supports both branch-name forms.
Please paginate using the existing links.next continuation pattern used by list_failed_jobs, query both branch forms, and deduplicate overlapping results.
Two focused tests should cover this general lookup contract:
- A self-built artifact on a second page remains discoverable.
- An artifact found only by the bare-ref query is discovered after the owner-qualified query returns nothing.
3. Run the existing unit suite in CI.
It passed locally with 67 tests and mocked subcases, but no configured job invokes it. Please add a small PR-triggered, path-scoped unit job, without registry access or privileged CI credentials:
uv run --no-project --python 3.12 \
.github/workflows/scripts/test_run_ci_command.pyThe broader trusted-worker, credential, and producer-provenance context should stay separated as in my review of #64131. Those are CI control-plane concerns; this PR need not expand to solve them. The new marker is useful bookkeeping, not by itself producer authentication.
…st job - /ci rocm cache also requires main's build.sh and bake file at the PR head, and the head's stack inputs to match the commit that built the image. Refusals point to /ci rocm nocache when merging main can't help. - Look up source builds across every page, under both the head label and the bare ref (not the base branch), limited to builds since the PR opened. - Run test_run_ci_command.py in a path-scoped pull_request workflow. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
|
thanks, all three are in db12044.
|
mawong-amd
left a comment
There was a problem hiding this comment.
The follow-up addresses my three concerns:
- Current-head compatibility: the selected build’s stack inputs must match the current PR head, and both the source and current-head recipes must match main.
- Complete candidate lookup: both owner-qualified and bare-ref branches are searched with bounded pagination and an explicit limit error. Excluding the base branch avoids unrelated main builds.
- CI coverage: the new
pull_request-scoped, path-filtered, read-only workflow runs the existing unit suite without privileged CI credentials.
I independently extracted the bare PR head and ran 71 passing tests. The GitHub workflow passed 72 because it checked out the merge ref, which includes one unrelated upstream test for pipeline branch-filter handling.
The built-stack metadata remains useful bookkeeping rather than independent producer authentication. The broader trusted-worker and artifact-provenance discussion remains appropriately separated, as in my review of #64131.
|
/ci run |
|
✅ Triggered Buildkite CI #100669 for commit ℹ️ This PR is 110 commits behind upstream |
|
/ci retry |
khluu
left a comment
There was a problem hiding this comment.
Kevin's review agent: approve for CI changes only
|
✅ The previous CI build is still running: https://buildkite.com/vllm/ci/builds/100669 |
PR Pundit review(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)
1. 🟠 Should fix: Stack from a non-passing build can be cached to rocm/vllm-ci: this PR writes cache key before tests run
Who is affected: Maintainers who run Checked against the code by an independent pass. 2. 🟠 Should fix:
|
|
/ci run |
|
✅ Triggered Buildkite CI #100707 for commit ℹ️ This PR is 10 commits behind upstream |
|
/ci run |
|
✅ Triggered Buildkite CI #100735 for commit |
PR Pundit review(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)
1. 🟠 Should fix: Another PR's planted cache layers can be promoted into trusted
|
build.sh: records the stack pair for/ci rocm cacheunderrocm-rocm-stack-builtonly when the build pushed it, not when it reused an existing tagrun_ci_command.py:/ci rocm cachecopies from the latest build of the PR that recorded it, at any commit, matched by the build's pull request rather than itsgithub-pr-numbermetadata, and names that commit in its replytest_rocm_build.py,test_run_ci_command.pyFollow-up to #65276, which caches the stack image a PR's CI records. A PR build reuses
rocm/vllm-dev:pr<N>-stack-rocm-<key>if that tag exists. The key is a hash of public files and every PR's CI can push torocm/vllm-dev, so another PR's CI could plant an image under that tag before this PR's CI runs; the PR's CI would record the planted digest, and/ci rocm cachewould copy it intorocm/vllm-ci. The lookup could also be fooled bygithub-pr-number, which any job of any build can set. Now only a stack the PR's own build pushed can be cached; when CI reused one instead, the bot refuses and points to/ci rocm nocache. This does not cover the PR's own code, which a maintainer still vouches for, or therocm/vllm-cipush credentials onamd-cpu, which PR builds can reach and need a separate fix.test_run_ci_command.py(67) andtest_rocm_build.py(44) pass, and both fail if either check is reverted.AI assistance (Claude Code) was used to draft this change. Every line was reviewed by the submitter.