alamb opened a new pull request, #26293:
URL: https://github.com/apache/datafusion/pull/26293

   ## Which issue does this PR close?
   
   - Part of #26292
   
   ## Rationale for this change
   
   The merge queue evicts PRs whose checks have not reported within 60 minutes 
(the GitHub default), even when nothing failed and the remaining jobs are only 
waiting for a runner. Each eviction discards the CI that already passed, forces 
someone to re-queue the PR by hand, and reruns everything from scratch. See 
#26292 for examples and numbers.
   
   Once the queue's CI is actually running it finishes in 10 to 25 minutes, so 
a longer timeout only changes what happens while jobs wait for runners: the 
entry stays queued and the finished work still counts.
   
   ## What changes are included in this PR?
   
   Adds a `Merge Queue` ruleset to `.asf.yaml` that sets 
`check_response_timeout_minutes: 360`. Every other merge queue parameter is set 
to the value the queue has today (read back via the GraphQL API), so the only 
behavior change is the timeout:
   
   | Parameter | Before | After |
   |---|---|---|
   | `check_response_timeout_minutes` | 60 | **360** |
   | `max_entries_to_build` | 5 | 5 |
   | `max_entries_to_merge` | 1 | 1 |
   | `min_entries_to_merge` / wait | 1 / 5 min | 1 / 5 min |
   | `merge_method` / `grouping_strategy` | SQUASH / ALLGREEN | SQUASH / 
ALLGREEN |
   
   Notes:
   
   - 360 minutes is the maximum the Rulesets API accepts for this field, so an 
8 hour timeout is not possible.
   - `.asf.yaml` has no dedicated merge queue syntax yet, but its `rulesets` 
feature passes raw Rulesets API payloads through, and `merge_queue` is one of 
the rule types. apache/datafusion-comet (apache/datafusion-comet#5843), 
apache/iceberg-rust and apache/seatunnel configure their queues this way. A 
convenience `merge_queue:` key is pending in apache/infrastructure-asfyaml#119.
   - Our queue was originally enabled by ASF Infra directly in classic branch 
protection (INFRA-27154) before `.asf.yaml` supported rulesets. GitHub layers 
rulesets and branch protection, but its docs do not say which merge queue 
configuration wins when both exist on one branch. After this merges we should 
confirm the effective timeout with the GraphQL query below and, if the classic 
setting still applies, ask Infra to turn off the branch protection copy so the 
ruleset is the single source of truth.
   - Merge queue rules reject wildcard ref patterns, so the ruleset covers only 
the default branch. Release branches keep their existing protection.
   
   ## What is the testing strategy for this PR?
   
   - `python3 ci/scripts/check_asf_yaml_status_checks.py` passes.
   - ASF's own schema validator, `asfyaml-validate` from 
apache/infrastructure-asfyaml, reports the file as valid.
   - `.asf.yaml` only takes effect once it lands on `main`, so the real check 
is after merge:
   
   ```
   gh api graphql -f query='{ repository(owner:"apache", name:"datafusion") {
     mergeQueue(branch:"main") { configuration {
       checkResponseTimeout maximumEntriesToBuild maximumEntriesToMerge
       minimumEntriesToMerge minimumEntriesToMergeWaitTime mergeMethod 
mergingStrategy } } } }'
   ```
   
   `checkResponseTimeout` should read `21600` (seconds) instead of today's 
`3600`, and `gh api repos/apache/datafusion/rulesets` should list a `Merge 
Queue` ruleset.
   
   ## Are there any user-facing changes?
   
   No. This only changes how long an entry may wait in the merge queue before 
being evicted.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to