Skip to content

fix(ci): stop auto-update workflow racing on merge push - #1811

Merged
LucasSantana-Dev merged 2 commits into
mainfrom
fix/auto-update-workflow-race
Jul 12, 2026
Merged

LucasSantana-Dev merged 2 commits into
mainfrom
fix/auto-update-workflow-race

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Bug (observed live)

After #1801 merged, its auto-update-pr-branches workflow ran green but updated 0 PRs — all 7 queued auto-merge PRs stayed BEHIND and the queue deadlocked (no further main-advance to re-fire the workflow; had to manually update-branch all 7).

Root cause

on: push: [main] fires the instant main advances, but GitHub hasn't recomputed the other PRs' mergeStateStatus to BEHIND yet — it reads UNKNOWN — so the == "BEHIND" filter matches none.

Fix

  • 45s settle on push events before listing (lets mergeStateStatus recompute).
  • */15 cron backstop — catches any stranded PR within ~15 min regardless of the race. Cheap (a gh pr list job, seconds).

Makes the merge-train self-heal instead of stranding on the first-merge race — the automation ship-all-prs depends on.


Summary by cubic

Fixes a race in the auto-update workflow after merges to main that sometimes updated zero PRs and stalled the queue. We now wait briefly on push runs and add a 15‑minute cron backstop to keep the merge train moving.

  • Bug Fixes
    • On push events, wait 45s before listing PRs so GitHub sets mergeStateStatus to BEHIND.
    • Add a */15 cron schedule to catch and update any stranded PRs within ~15 minutes.

Written for commit 73e3ae6. Summary will update on new commits.

Review in cubic

The workflow fires on 'push: main' but GitHub hasn't recomputed queued PRs'
mergeStateStatus to BEHIND yet (reads UNKNOWN), so a merge-triggered run
updates zero PRs and strands the queue with no further push to re-fire it
(observed: 7 PRs deadlocked after #1801 merged). Add a 45s settle on push +
a */15 cron backstop that catches any stranded PR regardless of the race.
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7fb42036-cd60-4a3e-a0c4-69e8be093814

📥 Commits

Reviewing files that changed from the base of the PR and between f20c4cf and 73e3ae6.

📒 Files selected for processing (1)
  • .github/workflows/auto-update-pr-branches.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/auto-update-workflow-race

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

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) July 12, 2026 15:57

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Requires human review: This modifies CI/CD workflow logic with a sleep and schedule trigger. Changes to deployment infrastructure, workflow timing, and race-condition fixes require human review to verify correctness and ensure no unintended side effects.

Re-trigger cubic

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 2ddd202 into main Jul 12, 2026
35 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the fix/auto-update-workflow-race branch July 12, 2026 16:23
LucasSantana-Dev added a commit that referenced this pull request Jul 13, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>2.35.0</summary>

##
[2.35.0](v2.34.0...v2.35.0)
(2026-07-13)


### Features

* **bot:** /bulk-kick — proof-of-pattern for the bulk-* command family
([#1802](#1802))
([1c11f3e](1c11f3e))
* **bot:** add lucky_bot_gateway_connected zombie-detection gauge
([#1774](#1774))
([6cc5287](6cc5287))
* **bot:** playback progress bar in nowplaying/songinfo embed
([#1797](#1797))
([1138b59](1138b59))
* **bot:** post server-count stats to Top.gg for listing visibility
([#1789](#1789))
([e8ca6b9](e8ca6b9))
* **bot:** temporary support ticket channels (/ticket)
([#1803](#1803))
([49601a1](49601a1))
* **live-notif:** youtube polling, message ttl cleanup, api backoff
([#1762](#1762))
([a99b85a](a99b85a))
* **remind:** channel and role broadcast reminders
([#1767](#1767))
([#1807](#1807))
([83ade79](83ade79))


### Bug Fixes

* **backend:** artist suggestions 503 not 500 on upstream timeout
([#1787](#1787))
([eadc20e](eadc20e))
* **bot:** guard skipReason telemetry against null prisma client
([#1773](#1773))
([d73421e](d73421e))
* **ci:** stop auto-update workflow racing on merge push
([#1811](#1811))
([2ddd202](2ddd202))
* **csp:** allow Cloudflare Insights beacon in script-src/connect-src
([#1788](#1788))
([f20c4cf](f20c4cf))
* **deps:** bump eslint in lock to satisfy npm@12 ci (unblock release)
([#1809](#1809))
([68fd0be](68fd0be))
* paginate bulk-move message fetch to respect discord api limit
([#1776](#1776))
([5b5d2fc](5b5d2fc))
* **weekly-digest:** trigger on Sunday and add new-guides RSS section
([#1761](#1761))
([f429fc6](f429fc6))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant