fix(hw-gate): resolve --checkout to an absolute path before launching a seat - #698
Merged
Merged
Conversation
… a seat First live run of the rung (workflow_dispatch on #686, run 33848923893) never reached Sol: review.py launched omp with cwd=checkout AND `--cwd checkout`, and the workflow passes `--checkout pr` relative to the job workspace, so omp resolved `pr/pr` and exited 1 before reading the diff. prelim.json came back null, hardware was skipped, and the status went red with "sol prelim unavailable". The dry runs on #679 did not catch it because the fake omp ignored `--cwd` and every test passed an absolute checkout. - review.py: abspath the checkout once after parse_args; all three seat launches and the git helpers inherit it. - tests/fake_omp.py: chdir to `--cwd` like the real binary, exit 1 with the same error shape when it does not exist. - tests/test_review.py: prelim with a relative --checkout from the parent directory must reach the seat and pass an absolute --cwd. Fails on the old script with the runner's exact error; passes with the fix. 103/103 in scripts/hw-gate/tests.
hw-gate sol prelimSol prelim unavailable: omp prelim failed (1): Error: Cannot change working directory to pr: ENOENT: no such file or directory, chdir '/home/kaden/actions-runner/_work/hipfire/hipfire/pr' -> '/home/kaden/actions-runner/_work/hipfire/hipfire/pr/pr'. run_hardware: false (sol unavailable, label hw-run may force) |
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.
Summary
First live run of the rung —
workflow_dispatchon #686, run 33848923893 — never reached Sol.review.pylaunches omp withcwd=checkoutand--cwd checkout; the workflow passes--checkout prrelative to the job workspace, so omp resolvedpr/prand exited 1 before reading the diff:prelim.jsoncame backnull, both hardware lanes were skipped, andhw-gatewent red with "sol prelim unavailable". The bot identity, secrets, runners, and comment posting all worked — the seat posted its own failure ashipfire-sol[bot].The #679 dry runs did not catch it because the fake omp ignored
--cwdand every test passed an absolute checkout.Changes
scripts/hw-gate/review.py:abspaththe checkout once afterparse_args; all three seat launches and the git helpers inherit it.scripts/hw-gate/tests/fake_omp.py:chdirto--cwdlike the real binary, exit 1 with the same error shape when it does not exist.scripts/hw-gate/tests/test_review.py:test_prelim_relative_checkout_reaches_the_seat— prelim invoked with a relative--checkoutfrom the parent directory must reach the seat and pass an absolute--cwd.Which surface(s) does this touch?
Evidence
Cannot change working directory to pr/checkout … -> pr/checkout/pr/checkout) and passes with the fix.python3 -m pytest scripts/hw-gate/tests -q→ 103 passed.After merge
Re-dispatch on #686:
gh workflow run hw-gate.yml -f pr=686. Gate scripts come from the base branch (pull_request_target), so the fix has to be onmasterbefore any PR can get a real prelim.