rapids-github-run-id: raise error if no run ID found - #193
Merged
Merged
Conversation
ajschmidt8
approved these changes
Jun 9, 2025
rapids-bot Bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
I've been using `rapids-get-pr-artifact` a lot recently, for rapidsai/build-planning#257 Today, one of my PRs for that briefly caused `cudf` to briefly exceed its GitHub API limits: NVIDIA/cudf#21671 (comment) This proposes some fixes to `rapids-get-pr-artifact` in the future: * error out of a unique GitHub Actions run ID can't be determined from the inputs - *(instead of passing an empty string to `gh run download`, which causes it to page over **all CI runs GitHub's history retains**)* * limit initial search for runs to just `pr.yaml` workflow - *(optionally overridable by env variable `RAPIDS_BUILD_WORKFLOW_NAME`)* These should make `rapids-get-pr-artifact` faster and, more importantly, use many fewer GitHub API calls. ## Notes for Reviewers ### Haven't I seen this before? Yep! Similar changes were made in `rapids-github-run-id`: * #193 * #170 `rapids-get-pr-artifact` doesn't use `rapids-github-run-id` because its behavior of "use environment variable `GITHUB_RUN_ID` if it's available" is undesirable when you're trying to workflow runs in a repo other than the one `rapids-get-pr-artifact` is currently running in. ### How I tested this Tested on NVIDIA/cudf#21671, with NVIDIA/cudf@c058c43 Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Gil Forsyth (https://github.com/gforsyth) URL: #249
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #192
Today,
rapids-github-run-idcan silently and "successfully" (exit code 0) return an empty string.This is never desirable in RAPIDS CI... that empty string leads to artifact-downloading grabbing whatever the latests uploaded artifacts happened to be, which can lead to problems of the form "not building/testing against the packages I intended to build/test against".
This can be difficult to recognize if pulling the wrong artifact doesn't result in outright failures.
To avoid that, this PR proposes raising a big loud error in the situation where no run ID is found.
Notes for Reviewers
How I tested this
Fails in the expected way for a SHA that does not exist:
Succeeds as expected for a real commit:
That exactly corresponds to https://github.com/rapidsai/rmm/actions/runs/15470752435/job/43554265779, which is correct.