Yicong-Huang opened a new pull request, #4845:
URL: https://github.com/apache/texera/pull/4845

   ### What changes were proposed in this PR?
   
   Two changes to `.github/workflows/auto-queue.yml`.
   
   **1. More triggers, shorter cron**
   
   ```yaml
   on:
     push: { branches: [main] }
     pull_request:
       types: [auto_merge_enabled, ready_for_review]
     pull_request_review:
       types: [submitted]
     workflow_run:
       workflows: [Required Checks]
       types: [completed]
     schedule:
       - cron: '*/5 * * * *'         # was '0 * * * *'
     workflow_dispatch:
   ```
   
   Each event covers a queue-state change that the previous setup had to wait 
up to an hour for cron to notice:
   
   - `auto_merge_enabled` — PR became eligible because its author just toggled 
the auto-merge button.
   - `ready_for_review` — draft → ready, possibly already approved.
   - `pull_request_review.submitted` — approval came in (script filters out 
Comment / Request changes via early return on `review.state !== 'approved'`).
   - `workflow_run completed` on `Required Checks` — bumped PR's CI just 
finished. On success, auto-merge fires and we get the `push:main` trigger; on 
failure, the in-flight guard releases and we can bump the next BEHIND PR 
same-second.
   - Cron is now bounded safety net (5 min) for any event GitHub fails to 
deliver.
   
   **2. In-flight guard**
   
   The GraphQL query now pulls the head commit's `statusCheckRollup.state`. The 
classifier treats an eligible PR as in-flight when its `mergeStateStatus` is 
not `BEHIND` and its CI rollup is `PENDING`, `EXPECTED`, or `SUCCESS`. When 
such a PR exists the run exits without calling `updateBranch` on anyone — the 
queue head is already moving, and bumping another PR would preempt CI capacity 
for a PR that would still need re-bumping after the head merges.
   
   Truth table:
   
   | `mergeStateStatus` | `statusCheckRollup` | In-flight? | Why |
   |---|---|---|---|
   | BEHIND | * | ❌ | CI runs on pre-update code; will re-run after 
`updateBranch`. |
   | BLOCKED | PENDING | ✅ | Required CI is running on with-main code. |
   | BLOCKED | FAILURE / ERROR | ❌ | Won't auto-merge; release the guard so the 
queue advances. |
   | CLEAN / HAS_HOOKS | SUCCESS | ✅ | About to auto-merge. |
   | UNSTABLE | PENDING | ✅ | Same as BLOCKED + PENDING. |
   | UNKNOWN | * | (existing UNKNOWN retry path) | Backoff and re-check. |
   
   ### Any related issues, documentation, discussions?
   
   None — incidental Auto Queue improvement.
   
   ### How was this PR tested?
   
   Workflow YAML parses (`python3 -c 'import yaml; yaml.safe_load(open(...))'` 
clean). The decision logic is exercised by every trigger after merge — no 
separate test harness exists for this workflow today. The first few days 
post-merge will surface any false-positive in-flight skips in the Insights run 
history.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.7, 1M context)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to