Add --run-github-repo to artifact_manager.py#4444
Merged
Conversation
Thread github_repository through create_backend_from_env so callers can specify which repo's artifacts to fetch. Without this, scripts running on forks look for artifacts in the fork's bucket instead of ROCm/TheRock's. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 task
erman-gurses
approved these changes
Apr 10, 2026
Contributor
erman-gurses
left a comment
There was a problem hiding this comment.
LGTM. The new --run-github-repo option is correctly wired through artifact_manager.py, and the workflows (Linux, Windows, and test_artifacts_structure) now pass artifact_github_repo explicitly. This resolves the fork vs main repo artifact lookup issue.
marbre
approved these changes
Apr 10, 2026
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.
Motivation
As I'm working on #4441, I want a way to fetch artifacts from workflow runs from ROCm/TheRock, even when running workflows from a fork like ScottTodd/TheRock. See also the docs at https://github.com/ROCm/TheRock/blob/main/docs/development/github_actions_debugging.md#working-effectively-from-forks
Technical Details
The bucket selection code used by this script has been treating workflow run ids as being associated with a default value of
GITHUB_REPOSITORY(the environment variable).This new code matches the existing pattern used for
fetch_artifacts.py:TheRock/build_tools/fetch_artifacts.py
Lines 329 to 339 in 8ae8a96
Test Plan
Try running a workflow in my fork with and without the new option, check that runs are now able to find artifacts.
Test Result
Before: https://github.com/ScottTodd/TheRock/actions/runs/24205465226/job/70660041372
After: https://github.com/ScottTodd/TheRock/actions/runs/24205988455/job/70661826987
python build_tools/build_tarballs.py \ --run-id="24164769563" \ + --run-github-repo="ROCm/TheRock" \ --dist-amdgpu-families="gfx1151;gfx110X-all" \ --platform="linux" \ --package-version="7.13.0.dev0+83ae8235312791cd7302e3f50c9935887d62b5a3" \ --output-dir="/home/runner/work/TheRock/TheRock/tarballs" Retrieving bucket info for workflow run... - github_repository: ScottTodd/TheRock + github_repository: ROCm/TheRock is_pr_from_fork: False - bucket: therock-ci-artifacts-external + bucket: therock-ci-artifacts Using backend: s3://therock-ci-artifacts-external/ScottTodd-TheRock/24164769563-linux -Found 0 artifacts in backend +Found 400 artifacts in backendSubmission Checklist