ci(ai-validation): skip prepare on Mergify-authored PRs#2043
Conversation
Lifts the existing Mergify-author short-circuit (today inside validate's `secrets-check` step) to a job-level `if:` on `prepare`, so the whole pipeline skips for backport/queue PRs. Why now: every Mergify backport whose merge ref shares no shallow ancestor with the (advanced) base branch fails the prepare step at git diff "$BASE...HEAD" --name-only ... fatal: FETCH_HEAD...HEAD: no merge base (because base is `git fetch --no-tags --depth=1` and the merge ref is `fetch-depth: 2`). Proximate symptom: run 25842928620 on PR #2042 (sagitta backport of #2023). AI Validation isn't a required check so the queue isn't blocked, but every Mergify backport is left with a red "prepare" check that adds noise to PR review. The validate-level skip in commit 0e8a295 was correct for the "claude-code-action rejects bot-initiated runs" failure mode but fires too late — prepare has already run and crashed before validate's `if: needs.prepare.outputs.has_md_changes == 'true'` even evaluates. Implementation: single job-level `if:` on prepare. validate's `needs: [prepare]` cascades the skip naturally (skipped needs make the dependent's expression-based `if:` evaluate against empty outputs). The in-step author check in validate stays as defense-in-depth. 🤖 Generated by [robots](https://vyos.io)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds a job-level ChangesAI Validation Workflow Guard
Possibly related PRs
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot review |
|
@mergify backport circinus sagitta |
✅ Backports have been createdDetails
|
ci(ai-validation): skip prepare on Mergify-authored PRs (backport #2043)
ci(ai-validation): skip prepare on Mergify-authored PRs (backport #2043)
Summary
if:onprepare, so the whole AI Validation pipeline skips for Mergify backport/queue PRs.fatal: FETCH_HEAD...HEAD: no merge basecrash that occurs when a backport's merge ref shares no shallow ancestor with the (advanced) base branch — concrete example: run 25842928620 on vyos-documentation#2042 (sagitta backport of vyos-documentation#2023).The validate-level skip in vyos-documentation@0e8a2956 was correct for the upstream
claude-code-actionrejecting bot-initiated runs, but fires too late —preparehas already run and crashed before validate'sif: needs.prepare.outputs.has_md_changes == 'true'even evaluates.Backport
(sagitta covered by direct hotfix vyos-documentation#2046 to unblock vyos-documentation#2042 immediately.)
Test plan
prepareandvalidateskipped (not failing).🤖 Generated by robots