Repository navigation
ci: read the PR merge ref with safe.directory set (fedora container job) - #575
Conversation
The fedora:44 stage1-size job runs in a container as root on a workspace that the runner owns. actions/checkout adds the workspace to safe.directory only for its own git calls, so the "Verify the PR merge ref" step's git cat-file fails with "dubious ownership", got= is empty, and every pull_request_target fedora job fails before it builds anything (#570 at 0188afd). Pass safe.directory on the command line in every copy of the check. The non-container jobs are unchanged in behaviour. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: MERGE at d26e737 after applicable CI.
Checked: All ten verification call sites use command-local safe.directory for the checked-out workspace only. The merge-parent check and exact expected head comparison remain. The owner reproduced the ownership failure and fix in Fedora 44. Verify the Fedora job using the landed workflow because pull_request_target reads the base workflow.
|
Code-owner ping for @DjDeveloperr: CLOSEOUT plans to merge this at Since #567 (merged 18:00), the fedora job on every aura PR fails at "Verify the PR merge ref". In the
Revert: |
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging at |
Since #567, every
pull_request_targetrun of thestage1-sizefedora job fails before it builds anything. The job runs in afedora:44container as root, on a workspace the runner owns.actions/checkoutputs the workspace intosafe.directoryonly for its own git calls. So the "Verify the PR merge ref matches this event" step'sgit cat-filefails withfatal: detected dubious ownership,got=is empty, and the step reportsmerge ref is for head , this event is for <sha>. Example: #570 at0188afd4, job 141262067641.This passes
-c safe.directory="$PWD"to thatgit cat-filein every copy of the check. The other jobs aren't containers, so their behaviour doesn't change.Tested: reproduced in
fedora:44(root, workspace owned by uid 1000, HEAD = merge commit 8c16c3f). Without the flag,gotis empty and git prints the dubious-ownership error. With it,got=09f7fdbb, the merge's second parent. All five workflow files parse as YAML.Risk: two-way · CI only (workflow files), no firmware change.
Note:
pull_request_targetjobs run the base branch's workflow, so this PR's own fedora job still runs the old step and fails the same way. Open PRs need a new event (push or update-branch) after this lands; re-running an old run keeps the old workflow.Revert:
git revert -m 1 <merge commit>