Cherry-pick #6101: use $GITHUB_WORKSPACE in artifact fetch output-dir for kube-mode runners#6319
Open
kasaurov wants to merge 1 commit into
Open
Cherry-pick #6101: use $GITHUB_WORKSPACE in artifact fetch output-dir for kube-mode runners#6319kasaurov wants to merge 1 commit into
kasaurov wants to merge 1 commit into
Conversation
…mode runners (#6101) ISSUE ID #6061 ## Problem `Validate artifact structure` was failing on AWS kube-mode runners but passing on Azure. On kube-mode runners, each step without a job-level `container:` block runs in its own short-lived container. The work PVC is mounted at `/__w/` inside step containers. The fetch step used `--output-dir="${{ github.workspace }}"`. This is a GHA template expression evaluated by the runner pod at **template expansion time** — before any shell runs in a container. The runner substitutes its own view of the path (`/home/runner/_work/TheRock/TheRock`), baking that literal string into the script. Inside the step container, `/home/runner/_work/` is not on the shared PVC. `artifact_manager.py` creates `.download_cache` there on ephemeral local storage that disappears when the step container exits. The next step (validate) runs in a new container. `THEROCK_ARTIFACTS_DIR` is a job-level env var — the ARC runner translates it to `/__w/TheRock/TheRock/.download_cache` when injecting it into the container. The test checks that path on the PVC, which was never written to. On Azure, `${{ github.workspace }}` and `$GITHUB_WORKSPACE` resolve to the same path — no translation happens and the test passes. ## Fix Changed `--output-dir="${{ github.workspace }}"` to `--output-dir="${GITHUB_WORKSPACE}"`. `$GITHUB_WORKSPACE` is a shell env var evaluated at **shell execution time** inside the container. The ARC runner injects it with the container-translated value (`/__w/TheRock/TheRock`), so `artifact_manager.py` downloads to `/__w/TheRock/TheRock/.download_cache` on the shared PVC — the same path the validate step checks. ## Verified Dispatched `test_artifacts_structure.yml` from this branch with the inputs from the original failing run (`artifact_run_id=28036338651`, `platform=windows`, `amdgpu_families=gfx110X-all;gfx1151;gfx120X-all`) — [run passed](https://github.com/ROCm/TheRock/actions/runs/28121123281). Closes #6061 Co-authored-by: kkhalasi <kkhalasi@amd.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Cherry-picks #6101 (
653b4fcb8) frommainontocompiler/amd-stagingTechnical Details
The
Validate artifact structurejob fails on the AWS kube-mode runners because the fetch step used--output-dir="${{ github.workspace }}"(a GHA template expression baked in as the host path) while the validate step readsTHEROCK_ARTIFACTS_DIR, which the runner translates to the container path/__w/....The two disagree, so the test reports
THEROCK_ARTIFACTS_DIR is not a directory: /__w/TheRock/TheRock/.download_cache.The fix switches the fetch to
--output-dir="${GITHUB_WORKSPACE}"(a shell env var evaluated inside the container), so the download and the test target the same path on the shared PVC.This bug reached
compiler/amd-stagingvia the main merge #6036, which snapshottedmainbefore #6101 landed; this cherry-pick brings the branch in line withmain.Test Plan
Test Result
Submission Checklist