You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2026/08/24 13:54:59 UTC

[PR] [INFRA] Improve pull request merge tool [kyuubi]

pan3793 opened a new pull request, #7654:
URL: https://github.com/apache/kyuubi/pull/7654

   ### Why are the changes needed?
   
   This ports several useful improvements from Spark's merge tool, adapted to Kyuubi's GitHub-only workflow. It makes merges and backports safer, more traceable, and less error-prone for committers.
   
   - Suggest backport branches in descending release order, such as `branch-1.12`, then `branch-1.11`, and skip branches already picked.
   - Post a merge summary comment listing every branch and full commit link where the change landed.
   - Normalize confirmation prompts to `(y/N)`.
   - Detect already-merged PRs more robustly, including reopened PRs and merges referenced by commits.
   - Explicitly close PRs merged into non-default branches when GitHub does not auto-close them.
   - Validate PR numbers, yes/no answers, and backport branch names before proceeding.
   - Derive lead and co-authors from GitHub-linked commits, defaulting the lead author to the PR author.
   - Apply Black formatting to the merge script.
   
   ### How was this patch tested?
   
   - `python3 -m py_compile dev/merge_kyuubi_pr.py`
   - `python3 -m doctest dev/merge_kyuubi_pr.py`
   - `black --check dev/merge_kyuubi_pr.py`
   - `git diff --check`
   
   ### Was this patch assisted by generative AI tooling?
   
   `Assisted-by: Codex:GLM 5.3`
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [INFRA] Improve pull request merge tool [kyuubi]

Posted by "wangzhigang1999 (via GitHub)" <gi...@apache.org>.
wangzhigang1999 commented on PR #7654:
URL: https://github.com/apache/kyuubi/pull/7654#issuecomment-5420269381

   The referenced-event fallback does not recognize merge messages generated by this script
   
   `_MERGE_FOOTER_RE` requires `Authored-by` or `Lead-authored-by` to appear immediately after the `Closes #<pr> from ...` paragraph. However, `merge_pr` inserts the linked issue and original commit summaries between those paragraphs.
   
   This does not affect the first merge of a new PR or backports completed in the same script run. It affects a later invocation that uses an already-merged PR number to continue backporting.
   
   I reproduced this with the existing release-branch PR [[#7116](https://github.com/apache/kyuubi/pull/7116)](https://github.com/apache/kyuubi/pull/7116), which was merged into `branch-1.10` as commit [[7c6d5658](https://github.com/apache/kyuubi/commit/7c6d5658298447ba440cd424d232b4d062573a69)](https://github.com/apache/kyuubi/commit/7c6d5658298447ba440cd424d232b4d062573a69). Its relevant events are:
   
   ```text
   referenced  7c6d5658298447ba440cd424d232b4d062573a69
   closed      commit_id=None
   ```
   
   The merge message contains:
   
   ```text
   Closes #7116 from turboFei/fix_conflicts.
   
   Closes #7101
   
   f25f487e8 [Wang, Fei] [KYUUBI #7101][1.10][FOLLOWUP] Fix code broken
   
   Authored-by: Wang, Fei <fw...@ebay.com>
   ```
   
   Running the code from this PR against those events gives:
   
   ```python
   find_merge_commit(7116, events)
   # (None, None)
   ```
   
   Since the `closed` event has no commit ID, `find_merge_commit` must use the referenced commit. The regex rejects its message, so a later invocation fails to recognize that PR #7116 has already landed and continues through the normal merge path instead of the backport path.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [INFRA] Improve pull request merge tool [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #7654: [INFRA] Improve pull request merge tool
URL: https://github.com/apache/kyuubi/pull/7654


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [INFRA] Improve pull request merge tool [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #7654:
URL: https://github.com/apache/kyuubi/pull/7654#issuecomment-5519584622

   **Merge Summary:**
   - merged into master https://github.com/apache/kyuubi/commit/ccca849416acdfab9cf4aed20d820ef701288ec5
   
   *Posted by `merge_kyuubi_pr.py`*


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [INFRA] Improve pull request merge tool [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #7654:
URL: https://github.com/apache/kyuubi/pull/7654#issuecomment-5514012702

   Fixed in 4a7759977: merge_footer_pr now selects the final generated Closes #N from <ref> line before the author trailer, instead of requiring them to be adjacent. Added a regression doctest for the linked-issue and commit-summary paragraphs, and verified PR #7116's real merge message now resolves to 7c6d5658.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org