Skip to content

[ML] Re-enable auto-merge for backport PRs (gated on required CI rollup)#3122

Merged
edsavage merged 1 commit into
elastic:mainfrom
edsavage:fix/reenable-backport-automerge
Jul 27, 2026
Merged

[ML] Re-enable auto-merge for backport PRs (gated on required CI rollup)#3122
edsavage merged 1 commit into
elastic:mainfrom
edsavage:fix/reenable-backport-automerge

Conversation

@edsavage

Copy link
Copy Markdown
Contributor

Summary

Re-enables auto-merge for auto-backport PRs, reverting the temporary disable in #3114.

#3114 disabled gh pr merge --auto because, at the time, the release branches did not require the ml-cpp build/test checks — so auto-merge would merge a backport as soon as the lightweight checks (CLA, snyk) passed, before the C++ matrix finished (this actually happened with #3106#3111).

That gap is now closed:

  • The pipeline publishes a single overall rollup status, buildkite/ml-cpp-pr-builds (publish_commit_status=True).
  • buildkite/ml-cpp-pr-builds is now a required status check on main and on 9.5 / 9.4 / 8.19.
  • The rollup reflects the whole build/test matrix, including any triggered QA/PyTorch downstream — those trigger steps are async: false, so a downstream failure propagates into the parent build and hence the rollup.

So gh pr merge --auto --squash now waits for CI to be green (and the one-review requirement to be met) before merging. If CI never runs or fails, the PR just stays open — fail-safe.

Approval continues to be posted by github-actions[bot] (a distinct identity from the ephemeral-token PR author), satisfying the org "[org] Require a PR" ruleset on the release branches.

Related: #3099 (CI-trigger fix #3103), #3112 (set_commit_status), #3114 (temporary disable).

Test plan

  • Merge a >bug PR carrying version + auto-backport labels.
  • Confirm each backport PR is approved by github-actions[bot] and has auto-merge armed.
  • Confirm a backport merges only after its buildkite/ml-cpp-pr-builds rollup goes green (not before).
  • Confirm a backport whose CI fails does not auto-merge.

Reverts the temporary disable from elastic#3114. Auto-merge is now safe because
main and the release branches require the buildkite/ml-cpp-pr-builds rollup
status, which reflects the whole build/test matrix (including async: false
QA/PyTorch downstream triggers). 'gh pr merge --auto --squash' therefore
waits for CI to go green and the review requirement to be met before merging;
if CI never runs or fails, the PR stays open (fail-safe).

Approval is still posted by github-actions[bot] (distinct from the
ephemeral-token author), satisfying the one-review ruleset on release branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elasticsearchmachine

Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

@edsavage
edsavage merged commit 67acc58 into elastic:main Jul 27, 2026
30 checks passed
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.

2 participants