Skip to content

ci: read the PR merge ref with safe.directory set (fedora container job) - #575

Merged
RyanTheTide merged 1 commit into
mainfrom
ci/fedora-merge-ref-safe-directory
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
ci/fedora-merge-ref-safe-directory

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Since #567, every pull_request_target run of the stage1-size fedora job fails before it builds anything. The job runs in a fedora:44 container as root, on a workspace the runner owns. actions/checkout puts the workspace into safe.directory only for its own git calls. So the "Verify the PR merge ref matches this event" step's git cat-file fails with fatal: detected dubious ownership, got= is empty, and the step reports merge ref is for head , this event is for <sha>. Example: #570 at 0188afd4, job 141262067641.

This passes -c safe.directory="$PWD" to that git cat-file in 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, got is 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_target jobs 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>

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>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Code-owner ping for @DjDeveloperr: CLOSEOUT plans to merge this at d26e7371 at 21:45 AEDT unless someone objects.

Since #567 (merged 18:00), the fedora job on every aura PR fails at "Verify the PR merge ref". In the fedora:44 container, git refuses the checkout ("dubious ownership"), so got is empty and the step exits before anything builds. This PR passes -c safe.directory="$PWD" to that one git call in the five workflows. Command-line config is a protected scope, so git honours it.

  • App APPROVED at this head.
  • The fix was reproduced and checked in fedora:44. The failure reproduces without it, and the step passes with it.
  • This PR's own fedora job can't show the fix: pull_request_target runs main's workflow. That is why it merges under the workflow-only rule (MERGETRAIN6 12:24, same as ci: run trusted x64 CI jobs on the aurora-buildbox runners #567).

Revert: git revert -m 1 <merge>.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merge readiness at d26e7371: not ready yet

Check Detail
CI at head no failing: Pytest (ubuntu-latest + gcc), Pytest (ubuntu-latest + llvm), Pytest (macos-26 + llvm-brew), Pytest (macos-15 + llvm-brew)
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA d26e7371, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · CI only (workflow files), no firmware change. Note: pull_request_target jobs 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>

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging at d26e7371 as announced at 20:4x. Nobody objected in 60 min. Gates: App APPROVED at this head. Workflow-only rule (MERGETRAIN6 12:24). The fix was verified in fedora:44. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit bfcd059 into main Nov 29, 2026
20 of 30 checks passed
@RyanTheTide
RyanTheTide deleted the ci/fedora-merge-ref-safe-directory branch November 29, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant