Skip to content

fix(ci): exclude promotion PR from pr-autoupdate#971

Merged
castrojo merged 1 commit into
mainfrom
fix/promotion-pr-stability
Jun 21, 2026
Merged

fix(ci): exclude promotion PR from pr-autoupdate#971
castrojo merged 1 commit into
mainfrom
fix/promotion-pr-stability

Conversation

@castrojo

@castrojo castrojo commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Problem

pr-autoupdate.yml was running gh pr update-branch on auto/promote-testing-to-main whenever main advanced. This created a merge commit on the squash branch which:

  1. Changed the tree, defeating the tree-identity check in reusable-promote-squash.yml
  2. Triggered a force-push on the next promote run
  3. Dismissed the maintainer approval (dismiss_stale_reviews: true)

Result: approvals could never survive to merge. The PR regenerated itself in a loop.

Fix

  • Exclude auto/promote-testing-to-main from pr-autoupdate.yml — the promote workflow is the sole owner of that branch and always rebuilds from fresh origin/main
  • Flipped dismiss_stale_reviews to false in branch protection via API — a valid approval now survives the nightly squash rebuild when tree content is identical

Testing

Branch protection change is live. The next promote run + approval will verify the fix.

Summary by CodeRabbit

  • Chores
    • Updated pull request automation workflow configuration to exclude certain branches from auto-update processing.

auto/promote-testing-to-main is always rebuilt fresh by
promote-testing-to-main.yml. When pr-autoupdate does a merge
commit onto the squash branch it changes the tree, defeats the
tree-identity check in reusable-promote-squash.yml, triggers a
force-push on the next promote run, and dismisses any pending
maintainer approval. Exclude the branch so the promote workflow
stays the sole owner of that branch.

Also flipped dismiss_stale_reviews to false in branch protection
via API so a valid approval survives the nightly squash rebuild
when the tree content is identical.

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
@castrojo castrojo requested a review from a team as a code owner June 21, 2026 03:14
@github-actions github-actions Bot added the pr/needs-review PR needs a maintainer review before it can move forward. label Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! A maintainer will review it.

While you wait, make sure these pass locally:

just validate        # element graph check
just build default   # build the image
just boot-test       # confirm the desktop boots (exits 0 = pass)
just lint            # bootc container lint

If this PR fixes a bug, add verify steps to the linked issue so users can confirm the fix on their hardware after the next nightly ships:

```verify
ujust <something>   # what users should run to confirm the fix
```

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 10e16eb1-82dd-4332-91e8-45cec47ae308

📥 Commits

Reviewing files that changed from the base of the PR and between 7b3a36c and 54eeaa7.

📒 Files selected for processing (1)
  • .github/workflows/pr-autoupdate.yml

📝 Walkthrough

Walkthrough

The pr-autoupdate.yml workflow is updated to exclude PRs whose head branch is auto/promote-testing-to-main from automatic updates. The JQ filter in the gh pr list command gains an additional exclusion condition, and new comments explain that this branch's merge/force-push behavior can alter tree identity and dismiss approvals.

Changes

PR Auto-Update Exclusion for Promote Branch

Layer / File(s) Summary
Exclude promote branch from pr-autoupdate filter
.github/workflows/pr-autoupdate.yml
Extends the JQ filter to skip PRs where headRefName equals auto/promote-testing-to-main, and adds comments explaining that the promote workflow's merge/force-push can change tree identity and dismiss approvals.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Possibly related PRs

  • projectbluefin/dakota#822: Adjusts the promote-to-main pipeline that produces the auto/promote-testing-to-main branch that this PR now excludes from auto-updates.
  • projectbluefin/dakota#931: Adds a complementary safeguard in sync-main-to-testing.yml to protect the auto/promote-testing-to-main branch, part of the same family of workflow coordination changes.

Suggested labels

area/ci, pr/needs-review, type/bug, priority/p1

Suggested reviewers

  • p5
  • tulilirockz

Poem

🐇 Hippity-hop, the promote branch must roam,
Free from merge bumps that muddle its home.
A filter now guards what the JQ weaves,
No auto-updates to ruffle its leaves!
The promote workflow tends its own tree — 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: excluding the promotion PR branch from the auto-update workflow to prevent cascading CI failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/promotion-pr-stability

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@castrojo castrojo enabled auto-merge (squash) June 21, 2026 03:15
@coderabbitai coderabbitai Bot added area/ci GitHub Actions workflows, pre-commit, linting, and build automation. priority/p1 Affects 3+ users — confirmed reproductions. type/bug labels Jun 21, 2026
@castrojo castrojo merged commit a96c4d6 into main Jun 21, 2026
13 checks passed
@castrojo castrojo deleted the fix/promotion-pr-stability branch June 21, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci GitHub Actions workflows, pre-commit, linting, and build automation. pr/needs-review PR needs a maintainer review before it can move forward. priority/p1 Affects 3+ users — confirmed reproductions. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant