-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add github action to prepare stable release #24697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github action to prepare stable release #24697
Conversation
de1c4dc to
b4d268a
Compare
6c6bc1e to
d12bbb6
Compare
czentgr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job automating this! A few questions.
| git push origin release-${{ env.PRESTO_RELEASE_VERSION }} --tags | ||
| echo "Pusing master branch" | ||
| git log --pretty="format:%ce: %s" -5 | ||
| git checkout master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to checkout the master branch and push it?
We pushed the new release branch above but why do we need to do this. It doesn't look like this changes anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to checkout the master branch and push it? We pushed the new release branch above but why do we need to do this. It doesn't look like this changes anything.
Because mvn release:prepare will create 2 commits on master branch like below and also a tag for each release
2025-01-27 943868a918 (oss-release-bot): [maven-release-plugin] prepare for next development iteration
2025-01-27 3374f1b274 (oss-release-bot): [maven-release-plugin] prepare release 0.291 <tag: 0.291>
Next we will create a release branch based on the tag for the next publish action
To make it easy to revert, I will first push the release branch and tag, then push the master branch.
In case anything failed during release, we just need to delete the branch and tag without reverting any commits on master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is to stick with maven as much as possible, even it means to revert master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is to stick with maven as much as possible, even it means to revert master branch.
@wanglinsong I think in most of the cases, it should be fine with both pushing order since they all do the same thing - pushing the release branch & tag, and commits to master branch. For the failed cases, let me explain it in detail.
With the order as you suggested ( push the master branch & tag, then the release branch):
- When failed to push to the master branch, just delete the tag and re-run the job
- When successfully pushed to master but failed to push the release tag, need reset
masterbranch to remove the commits, then re-run the failed job - When failed to push the release branch, need reset
masterbranch to remove the commits, delete the tag and try again.
With the order I used( push the release branch & tag, then master branch)
- When push to release branch & tag failed, just delete the branch & tag(if exists), and re-run the job
- When push to master failed, just delete the release branch & tag(since they are newly created, no one is working on it)
Because reset the commits on master branch will have impact on the open PRs which has greater risk than delete the newly created branch and tag, that why I think it's better to keep the pushing order in my PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. I agree that we wouldn't want to reset the master branch if we can avoid it.
Do we need to generally worry about race conditions if a committer merges a PR while the running. I suspect in that case we would fail the push to master because the master branch base is different and it can't push the maven commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to generally worry about race conditions if a committer merges a PR while the running. I suspect in that case we would fail the push to master because the master branch base is different and it can't push the maven commits.
Because there is a special settings to let the user prestodb-ci by pass the PR rules, this user can push commits directly on master branch. Also about the race conditions, I think it follows the git pushing rules, the worse case is that some PRs merged during the action, which will cause it failed to push the commits to master branch. In this case, we can delete the branch and tag, then try the action again without any impact on all the open PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is to stick with maven as much as possible, even it means to revert master branch.
@wanglinsong I think in most of the cases, it should be fine with both pushing order since they all do the same thing - pushing the release branch & tag, and commits to master branch. For the failed cases, let me explain it in detail.
With the order as you suggested ( push the master branch & tag, then the release branch):
- When failed to push to the master branch, just delete the tag and re-run the job
- When successfully pushed to master but failed to push the release tag, need reset
masterbranch to remove the commits, then re-run the failed job- When failed to push the release branch, need reset
masterbranch to remove the commits, delete the tag and try again.With the order I used( push the release branch & tag, then master branch)
- When push to release branch & tag failed, just delete the branch & tag(if exists), and re-run the job
- When push to master failed, just delete the release branch & tag(since they are newly created, no one is working on it)
Because reset the commits on master branch will have impact on the open PRs which has greater risk than delete the newly created branch and tag, that why I think it's better to keep the pushing order in my PR.
This is no reason of failing to push the release branch, which is a new branch, no any conflicts possible at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no reason of failing to push the release branch, which is a new branch, no any conflicts possible at all.±
Yes, but if the release needs to be reverted for some reason, the release branch and tag might be forgotten to be deleted.
czentgr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one nit.
| git push origin release-${{ env.PRESTO_RELEASE_VERSION }} --tags | ||
| echo "Pusing master branch" | ||
| git log --pretty="format:%ce: %s" -5 | ||
| git checkout master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. I agree that we wouldn't want to reset the master branch if we can avoid it.
Do we need to generally worry about race conditions if a committer merges a PR while the running. I suspect in that case we would fail the push to master because the master branch base is different and it can't push the maven commits.
| echo "Pushing release branch release-${{ env.PRESTO_RELEASE_VERSION }} and tag ${{ env.PRESTO_RELEASE_VERSION }}" | ||
|
|
||
| echo "commits on release-${{ env.PRESTO_RELEASE_VERSION }} branch" | ||
| git ls -4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: for consistence use 5 here? Before and after this 5 is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@czentgr The reason the number changes between 4 and 5 is that I want to keep the logs containing the last 3 commits that were not generated by the Maven release plugin
Take 0.291 for example, in the branch release-0.291 and tag 0.291, the command git ls -4 will display the 4 commits as follows:
In the master branch, the comand git ls -5 will display the last 5 commits, which has the same 3 commits in the release branch

But it's also fine to keep 5 commits in both situations. We only use the logs to verify that the release branch was created correctly.
@steveburnett I'll update the document to https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months) , I'll let you know after it is updated, thanks |
|
@steveburnett I added the document of this new release process to https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#for-release-after-0291 under section Release after 0.291, please help to review, thanks. |
Looks good, thanks! I have some minor edits to suggest - punctuation and similar nits, nothing affecting the meaning or the sequence of events. Would you like me to tell you these nits, or would you like me to just edit the wiki page myself? I can work either way but I think the second option is faster and simpler. |
Thanks, please feel free to edit the wiki. |
| default: true | ||
| required: false | ||
| dependency_image: | ||
| description: 'Dependency image(e.g., prestodb/presto-native-dependency:latest)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unidevel The latest is not up to date. Use 0.292-20250204112033-cf8ba84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@majetideepak I think this is fine, because this is only an example in description and it will not only be used for the release 0.292. Ideally we can use prestodb/presto-native-dependency:latest in future releases.
@wanglinsong I think we need either update or remove the latest tag for prestodb/presto-native-dependency docker images.
Done! |
|
per discussion with @wanglinsong , will put the publish action to a new PR. |
wanglinsong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@wanglinsong, @unidevel Is there any value to publicly releasing the dependency image? |
Yes, I believe there are values such as:
|
|
BTW, I created a new PR for the publish action, this PR only have the prepare release action now. |
) ## Description This is a follow up of PR #24697, seperate the github release actions into 2 PRs. This is the second one - publish release artifacts like jars, docker images, websites, etc. The document of stable release process can be found in https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months) <!---Describe your changes in detail--> Prior to the coming release, there were 5 steps: - [Step 1 - Create a release branch and increment the version in the master branch](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-1-create-a-release-branch-and-increment-the-version-in-the-master-branch) - [Step 2 - Create release notes PR](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)) - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) ### Action "Presto Stable Release -Publish" <img width="969" alt="presto_release_publish_workflow" src="https://github.com/user-attachments/assets/31e941ac-c3b9-4a2d-9660-1e9bfaaf2e26" /> - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) #### Parameters <img width="309" alt="presto_release_publish_inputs" src="https://github.com/user-attachments/assets/54e18451-e99c-43b0-9921-a90983edd592" /> #### Jobs  This PR required prestodb/presto-release-tools#47, prestodb/prestodb.github.io#291 to be merged and released a new version`presto-release-tools` of before using these 2 actions ## Motivation and Context ## Impact Presto stable release ## Test Plan - Tested with my env - Publish => https://github.com/unix280/presto/actions/runs/13844025717 - Test with new release 0.292 after merged ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes ``` == NO RELEASE NOTE == ```
…stodb#24821) ## Description This is a follow up of PR prestodb#24697, seperate the github release actions into 2 PRs. This is the second one - publish release artifacts like jars, docker images, websites, etc. The document of stable release process can be found in https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months) <!---Describe your changes in detail--> Prior to the coming release, there were 5 steps: - [Step 1 - Create a release branch and increment the version in the master branch](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-1-create-a-release-branch-and-increment-the-version-in-the-master-branch) - [Step 2 - Create release notes PR](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)) - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) ### Action "Presto Stable Release -Publish" <img width="969" alt="presto_release_publish_workflow" src="https://github.com/user-attachments/assets/31e941ac-c3b9-4a2d-9660-1e9bfaaf2e26" /> - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) #### Parameters <img width="309" alt="presto_release_publish_inputs" src="https://github.com/user-attachments/assets/54e18451-e99c-43b0-9921-a90983edd592" /> #### Jobs  This PR required prestodb/presto-release-tools#47, prestodb/prestodb.github.io#291 to be merged and released a new version`presto-release-tools` of before using these 2 actions ## Motivation and Context ## Impact Presto stable release ## Test Plan - Tested with my env - Publish => https://github.com/unix280/presto/actions/runs/13844025717 - Test with new release 0.292 after merged ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes ``` == NO RELEASE NOTE == ```
* Combine github stable release action with add release-notes action * Update action name and messages for failure * Add publish presto release action * Add publishing docs to presto release publish action * Refactor the release actions by review comments * Fix incorrect usage of gpg passphrase * Refactor action based on review comments * Fix the cancel state of publish action * Publish dependency image to dockerhub * Fix action dependency checking * Update descriptions in the release actions * Remove presto-release-publish.yml first
…stodb#24821) ## Description This is a follow up of PR prestodb#24697, seperate the github release actions into 2 PRs. This is the second one - publish release artifacts like jars, docker images, websites, etc. The document of stable release process can be found in https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months) <!---Describe your changes in detail--> Prior to the coming release, there were 5 steps: - [Step 1 - Create a release branch and increment the version in the master branch](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-1-create-a-release-branch-and-increment-the-version-in-the-master-branch) - [Step 2 - Create release notes PR](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)) - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) ### Action "Presto Stable Release -Publish" <img width="969" alt="presto_release_publish_workflow" src="https://github.com/user-attachments/assets/31e941ac-c3b9-4a2d-9660-1e9bfaaf2e26" /> - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) #### Parameters <img width="309" alt="presto_release_publish_inputs" src="https://github.com/user-attachments/assets/54e18451-e99c-43b0-9921-a90983edd592" /> #### Jobs  This PR required prestodb/presto-release-tools#47, prestodb/prestodb.github.io#291 to be merged and released a new version`presto-release-tools` of before using these 2 actions ## Motivation and Context ## Impact Presto stable release ## Test Plan - Tested with my env - Publish => https://github.com/unix280/presto/actions/runs/13844025717 - Test with new release 0.292 after merged ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes ``` == NO RELEASE NOTE == ```
…stodb#24821) ## Description This is a follow up of PR prestodb#24697, seperate the github release actions into 2 PRs. This is the second one - publish release artifacts like jars, docker images, websites, etc. The document of stable release process can be found in https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months) <!---Describe your changes in detail--> Prior to the coming release, there were 5 steps: - [Step 1 - Create a release branch and increment the version in the master branch](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-1-create-a-release-branch-and-increment-the-version-in-the-master-branch) - [Step 2 - Create release notes PR](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)) - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) ### Action "Presto Stable Release -Publish" <img width="969" alt="presto_release_publish_workflow" src="https://github.com/user-attachments/assets/31e941ac-c3b9-4a2d-9660-1e9bfaaf2e26" /> - [Step 3: clean up the tag](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-3-clean-up-the-tag) - [Step 4: Publish Maven and Docker artifacts](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-4-publish-maven-and-docker-artifacts) - [Step 5: Publish docs website](https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)#step-5-publish-docs-website) #### Parameters <img width="309" alt="presto_release_publish_inputs" src="https://github.com/user-attachments/assets/54e18451-e99c-43b0-9921-a90983edd592" /> #### Jobs  This PR required prestodb/presto-release-tools#47, prestodb/prestodb.github.io#291 to be merged and released a new version`presto-release-tools` of before using these 2 actions ## Motivation and Context ## Impact Presto stable release ## Test Plan - Tested with my env - Publish => https://github.com/unix280/presto/actions/runs/13844025717 - Test with new release 0.292 after merged ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes ``` == NO RELEASE NOTE == ```

Description
The document of stable release process can be found in https://github.com/prestodb/presto/wiki/Stable-release-process-(every-2-months)
Prior to the coming release, there were 5 steps:
By the suggestion from @ethanyzhang, will merge the steps into 2 github actions:
Action 1 - "Presto Stable Release - Prepare"
Parameters
Action 2 -"Presto Stable Release - Publish"
In the PR #24821
Motivation and Context
Impact
Presto stable release
Test Plan
Contributor checklist
Release Notes