Hi Celeborn Committers,

A PR merge tool `dev/merge_pr.py` was added to the Celeborn git repo[1][2], it 
aims to simplify the PR merge and backport process, and improve the git commit 
history.

AFAIK, this tool is originally from Apache Parquet, then, it was borrowed and 
modified by Apache Spark, Apache Kyuubi.

Compare with the current way we are using, use GitHub squash to merge PR, this 
tool has the following pros:

- squash all commits into one, this is the same as GitHub squash, but also fix 
the PR title in canonicalize format:
  [CELEBORN-XXXX][LABEL] Title of the pull request
- it’s an interactive script, the committer just needs to follow the prompt and 
react with y/n, then can complete the PR backport,
  JIRA assignment, JIRA fixed version update
- reserve the author and committer information in the git history, the GitHub 
squash always marks the committer as
  GitHub <[email protected]>, which is really bad.
- reserve the PR description as the git commit message body, again, please fill 
in the PR description seriously :)

Some setup procedures are required to use this merge tool:

1. invoking it at the celeborn git project root dir
2. naming the upstream repo as “apache”, you can check it by `git remote -v`, 
the desired output should be like
    apache-celeborn git:(main) git remote -v
    apache [email protected]:apache/incubator-celeborn.git (fetch)
    apache [email protected]:apache/incubator-celeborn.git (push)
3. export environment variables ASF_USERNAME ASF_PASSWORD which is used for 
JIRA authentication
4. export environment variable GITHUB_OAUTH_KEY which is used for GitHub 
authentication.
    You can create an OAuth key at https://github.com/settings/tokens
5. install python JIRA dependencies by `pip install jira` or `pip install -r 
requirements.txt`

As an example, [3] is merged by this tool.

Please let me know if you have any questions or concerns w/ this tool.

[1] https://issues.apache.org/jira/browse/CELEBORN-623
[2] https://github.com/apache/incubator-celeborn/pull/1539
[3] 
https://github.com/apache/incubator-celeborn/commit/67762783d0d51acb147f35e9a59e2bfec48ec04b

Thanks,
Cheng Pan




Reply via email to