Introduction
This release process document is based on Apache Beam Release Guide and Apache Flink Release Guide
...
Please remember that publishing software has legal consequences. This guide complements the foundation-wide Product Release Policy and Release Distribution Policy.
Overview
The release process consists of several steps:
- Decide to release
- Prepare for the release
- Build a release candidate
- Vote on the release candidate
- During vote process, run validation tests
- If necessary, fix any issues and go back to step 3.
- Finalize the release
- Promote the release
Decide to release
Deciding to release and selecting a Release Manager is the first step of the release process. This is a consensus-based decision of the entire community.
...
In general, the community prefers to have a rotating set of 3-5 Release Managers. Keeping a small core set of managers allows enough people to build expertise in this area and improve processes over time, without Release Managers needing to re-learn the processes for each release. That said, if you are a committer interested in serving the community in this way, please reach out to the community on the dev@ mailing list.
Checklist to proceed to the next step
- Community agrees to release
- Community selects a Release Manager
Prepare for the release
Before your first release, you should perform one-time configuration steps. This will set up your security keys for signing the release and access to various release repositories.
...
NOTE: If you are using GitHub two-factor authentication and haven’t configure HTTPS access, please follow the guide to configure command line access.
One-time setup instructions
GPG Key
You need to have a GPG key to sign the release artifacts. Please be aware of the ASF-wide release signing guidelines. If you don’t have a GPG key associated with your Apache account, please create one according to the guidelines.
There are 2 ways to configure your GPG key for release, either using release automation script(which is recommended), or running all commands manually.
Use preparation_before_release.sh to setup GPG
- Script: preparation_before_release.sh
Usage ./hudi/scripts/release/preparation_before_release.sh
- Tasks included
- Help you create a new GPG key if you want.
- Configure git user.signingkey with chosen pubkey.
- Add chosen pubkey into dev KEYS and release KEYS
NOTES: Only PMC can write into release repo. - Start GPG agents.
Run all commands manually
- Get more entropy for creating a GPG key
sudo apt-get install rng-tools
sudo rngd -r /dev/urandom
...
- Configure git to use this key when signing code by giving it your key ID, as follows:
git config --global user.signingkey CD4C59FD, or git config --global user.signingkey 623E08E06DB376684FB9599A3F5953147903948A
- You may drop the --global option if you’d prefer to use this key for the current repository only.
- Start GPG agent in order to unlock your GPG key
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_TTY=$(tty)
export GPG_AGENT_INFO
Access to Apache Nexus repository
Configure access to the Apache Nexus repository, which enables final deployment of releases to the Maven Central Repository.
...
Code Block |
---|
<settings> <servers> <server> <id>apache.releases.https</id> <username>TOKEN_NAME</username> <password>TOKEN_PASSWORD</password> </server> <server> <id>apache.snapshots.https</id> <username>TOKEN_NAME</username> <password>TOKEN_PASSWORD</password> </server> </servers> </settings> |
Submit your GPG public key into MIT PGP Public Key Server
In order to make yourself have the right permission to stage java artifacts in Apache Nexus staging repository, please submit your GPG public key into MIT PGP Public Key Server. If you have problem in submit your GPG key to the key server in browse, please try run
...
would also refer to stackoverflow.
Create a new version in JIRA
When contributors resolve an issue in JIRA, they are tagging it with a release that will contain their changes. With the release currently underway, new issues should be resolved against a subsequent future release. Therefore, you should create a release item for this subsequent release, as follows:
...
- In JIRA, navigate to Hudi > Administration > Versions.
- Add a new release. Choose the next minor version number after the version currently underway, select the release cut date (today’s date) as the Start Date, and choose Add.
- At the end of the release, go to the same page and mark the recently released version as released. Use the ... menu and choose Release.
Triage release-blocking issues in JIRA
There could be outstanding release-blocking issues, which should be triaged before proceeding to build a release candidate. We track them by assigning a specific Fix version field even before the issue resolved.
...
If there is a bug found in the RC creation process/tools, those issues should be considered high priority and fixed in 7 days.
Review Release Notes in JIRA
JIRA automatically generates Release Notes based on the Fix Version field applied to issues. Release Notes are intended for Hudi users (not Hudi committers/contributors). You should ensure that Release Notes are informative and useful.
...
- Be appropriately classified as Bug, New Feature, Improvement, etc.
- Represent noteworthy user-facing changes, such as new functionality, backward-incompatible API changes, or performance improvements.
- Have occurred since the previous release; an issue that was introduced and fixed between releases should not appear in the Release Notes.
- Have an issue title that makes sense when read on its own.
Create a release branch in apache/hudi repository
Attention: Only committer has permission to create release branch in apache/hudi. Skip this step if it is a bug fix release. But do set the env variables.
...
Code Block |
---|
# Cut a release branch Cd scripts && ./release/cut_release_branch.sh \ --release=${RELEASE_VERSION} \ --next_release=${NEXT_VERSION} \ --rc_num=${RC_NUM} # Show help page ./hudi/scripts/release/cut_release_branch.sh -h |
For Bug Fix release:
Here is how to go about a bug fix release.
- Create a branch in your repo (<user>/hudi).
- cherry pick commits from master that needs to be part of this release. (git cherry-pick commit-hash). You need to manually resolve the conflicts. For eg, a file might have been moved to a diff class in master where as in your release branch, it could be in older place. You need to take a call where to place it. Similar things like file addition, file deletion, etc.
- Ensure both compilation and tests are good.
- I assume you will have apache/hudi as upstream. If not add it as upstream
- Once the branch is ready with all commits, go ahead and push your branch to upstream.
- Go to apache/hudi repo locally and pull this branch. Here after you can work on this branch and push to origin when need be.
- Do not forget to set the env variables from above section.
Verify that a Release Build Works
Run mvn -Prelease clean install to ensure that the build processes are in good shape. // You need to execute this command once you have the release branch in apache/hudi
Checklist to proceed to the next step
- Release Manager’s GPG key is published to dist.apache.org
- Release Manager’s GPG key is configured in git configuration
- Release Manager has org.apache.hudi listed under Staging Profiles in Nexus
- Release Manager’s Nexus User Token is configured in settings.xml
- JIRA release item for the subsequent release has been created
- All test failures from branch verification have associated JIRA issues
- There are no release blocking JIRA issues
- Release branch has been created
- Release Notes have been audited and added to RELEASE_NOTES.md
Build a release candidate
The core of the release process is the build-vote-fix cycle. Each cycle produces one release candidate. The Release Manager repeats this cycle until the community approves one release candidate, which is then finalized.
...
git checkout ${RELEASE_BRANCH}
- Run mvn version to set the proper rc number in all artifacts
mvn versions:set -DnewVersion=${RELEASE_VERSION}-rc${RC_NUM}
- Run Unit tests and ensure they succeed
mvn test -DskipITs=true
- Run Integration Tests and ensure they succeed
mvn verify -DskipUTs=true
- Commit and push this change to RELEASE branch
git commit -am "Bumping release candidate number ${RC_NUM}"
There will be some backup files created which needs to be removed. You could do "git clean -fdx" before doing the commit.
git push origin ${RELEASE_BRANCH}
If you already have a remote tag with same name as your branch, you can try below command.
git push origin refs/heads/${RELEASE_BRANCH}
"refs/heads/" refers to a branch.
"refs/tags/" refers to tag.
- Generate Source Release: This will create the tarball under hudi/src_release directory
git checkout ${RELEASE_BRANCH}
cd scripts && ./release/create_source_release.sh
If you have multiple gpg keys(gpg --list-keys), then the signing command will take in the first key most likely. You will release this when it asks for a passphrase in a pop up. When asked for passphrase, ensure the intended key is the one asked for.
Command used in script:
gpg --armor --detach-sig ${RELEASE_DIR}/hudi-${RELEASE_VERSION}.src.tgz
To use a specific key: update as follows: // replace FINGERPRINT
gpg --local-user [FINGERPRINT] --armor --detach-sig ${RELEASE_DIR}/hudi-${RELEASE_VERSION}.src.tgz
- Verify Source release is signed and buildable
- cd hudi/src_release
- gpg --verify hudi-${RELEASE_VERSION}-rc${RC_NUM}.src.tgz.asc hudi-${RELEASE_VERSION}-rc${RC_NUM}.src.tgz
- tar -zxvf hudi-${RELEASE_VERSION}-rc${RC_NUM}.src.tgz && cd hudi-${RELEASE_VERSION}-rc${RC_NUM} && mvn clean package -DskipTests
- If they pass, delete the repository we got from the tar-ball
- cd ../ && rm -rf hudi-${RELEASE_VERSION}-rc${RC_NUM}
- Create tag
git tag -s release-${RELEASE_VERSION}-rc${RC_NUM} -m "${RELEASE_VERSION}"
If you run into some issues, and if want to re-run the same candidate again from start, ensure you delete existing tags before retrying again.
// to remove local
git tag -d release-${RELEASE_VERSION}-rc${RC_NUM}
// to remove remote
git push --delete origin release-${RELEASE_VERSION}-rc${RC_NUM}- if apache repo is origin.
git push origin release-${RELEASE_VERSION}-rc${RC_NUM}
If a branch with the same name already exists in origin, this command might fail as below.
error: src refspec release-0.5.3 matches more than one
error: failed to push some refs to 'https://github.com/apache/hudi.git'
In such a case, try below command
git push origin refs/tags/release-${RELEASE_VERSION}
- Deploy maven artifacts and verify
- This will deploy jar artifacts to the Apache Nexus Repository, which is the staging area for deploying jars to Maven Central.
- Review all staged artifacts (https://repository.apache.org/). They should contain all relevant parts for each module, including pom.xml, jar, test jar, source, test source, javadoc, etc. Carefully review any new artifacts.
git checkout ${RELEASE_BRANCH}
- This will deploy 2.11 artifacts to repository.apache.org
cd scripts && ./release/deploy_staging_jars.sh --scala_version=2.11
- This will deploy 2.12 artifacts to repository.apache.org.
./release/deploy_staging_jars.sh --scala_version=2.12
- Review all staged artifacts to ensure it contains both 2.11 and 2.12 artifacts, mainly hudi-spark-bundle-2.11/2.12, hudi-spark-2.11/2.12, hudi-utilities-bundle_2.11/2.12 and hudi-utilities_2.11/2.12.
- Once you have ensured everything is good and validation of step 7 succeeds, you can close the staging repo. Closing is kind of commit. Until you close, you can re-run deploying to staging multiple times. But once closed, it will create a new staging repo. So, once everything is good, close the staging repository on Apache Nexus. When prompted for a description, enter “Apache Hudi, version ${RELEASE_VERSION}, release candidate ${RC_NUM}”.
- Stage source releases on dist.apache.org
- If you have not already, check out the Hudi section of the dev repository on dist.apache.org via Subversion. In a fresh directory
- if you would not checkout, please try svn checkout https://dist.apache.org/repos/dist/dev/hudi again.
svn checkout https://dist.apache.org/repos/dist/dev/hudi --depth=immediates
- Make a directory for the new release:
mkdir hudi/hudi-${RELEASE_VERSION}-rc${RC_NUM}
- Copy Hudi source distributions, hashes, and GPG signature:
mv <hudi-dir>/src_release/* hudi/hudi-${RELEASE_VERSION}-rc${RC_NUM}
- Add and commit all the files.
cd hudi
svn add hudi-${RELEASE_VERSION}-rc${RC_NUM}
svn commit
- Verify that files are present
- Run Verification Script to ensure the source release is sane
cd scripts && ./release/validate_staged_release.sh --release=${RELEASE_VERSION} --rc_num=${RC_NUM} --verbose
Checklist to proceed to the next step
Maven artifacts deployed to the staging repository of repository.apache.org
Source distribution deployed to the dev repository of dist.apache.org and validated
Vote on the release candidate
Once you have built and individually reviewed the release candidate, please share it for the community-wide(dev@hudi ) review. Please review foundation-wide voting guidelines for more information.
...
Please look at previous examples in previous releases. For example : Please see examples here : voting in dev , voting in general and result of voting
Checklist to proceed to the finalization step
- Community votes to release the proposed candidate, with at least three approving PMC votes
Fix any issues
Any issues identified during the community review and vote should be fixed in this step.
...
Once all issues have been resolved, you should go back and build a new release candidate with these changes.
Checklist to proceed to the next step
- Issues identified during vote have been resolved, with fixes committed to the release branch.
Finalize the release
Once the release candidate has been reviewed and approved by the community, the release should be finalized. This involves the final deployment of the release candidate to the release repositories, merging of the website changes, etc.
Current follow the below steps to finalize the release.
- change the version from ${RELEASE_VERSION}-rc${RC_NUM} to ${RELEASE_VERSION} against release branch, use command `mvn versions:set -DnewVersion=${RELEASE_VERSION}`, e.g. change 0.5.1-rc1 to 0.5.1.
- Repeat the steps from Generate Source Release(f) to Stage source releases on dist.apache.org(i). Note that make sure remove the -rc${RC_NUM} suffix when repeat the above steps. and please also verify the steps.
- One more step is to deploy source code to release dist. https://dist.apache.org/repos/dist/release/hudi. Only PMC will have access to this repo. So, if you are not a PMC, do get help from somone who is.
- svn checkout https://dist.apache.org/repos/dist/release/hudi --depth=immediates, if you would not checkout, please try svn checkout https://dist.apache.org/repos/dist/release/hudi again.
- Make a directory for the new release:
- mkdir hudi/hudi-${RELEASE_VERSION}
- Copy Hudi source distributions, hashes, and GPG signature:
- mv <hudi-dir>/src_release/* hudi/hudi-${RELEASE_VERSION}
- Add and commit all the files.
- cd hudi
- svn add hudi-${RELEASE_VERSION}
- svn commit
- Verify that files are present
- Use the Apache Nexus repository to release the staged binary artifacts to the Maven Central repository. In the
Staging Repositories
section, find the relevant release candidateorgapachehudi-XXX
entry and clickRelease
. Drop all other release candidates that are not being released. - In Jira, go to Releases → <Release Version> and ensure that all Jiras for the release are 'Closed' state, if not transition all 'Resolved' jiras to 'Closed'.
- Finalize the Release in Jira by providing the release date.
- Update DOAP file in the root of the project via sending a PR like this one.
Steps to cut doc version and update website.
- Follow the instructions for cutting a doc for this new release.
- Build the site locally and ensure the new doc version is available as intended.
- Update site using instructions
Promote the release
Once the release has been finalized, the last step of the process is to promote the release within the project and beyond. Please wait for 24h after finalizing the release in accordance with the ASF release policy.
Apache mailing lists
Announce on the dev@ mailing list that the release has been finished.
...
From: Release Manager Subject: [ANNOUNCE] Apache Hudi <VERSION> released
The Apache Hudi team is pleased to announce the release of Apache Hudi <VERSION>. Apache Hudi (pronounced Hoodie) stands for Hadoop Upserts Deletes and Incrementals. Apache Hudi manages storage of large analytical datasets on DFS (Cloud stores, HDFS or any Hadoop FileSystem compatible storage) and provides the ability to query them. This release comes xxx months after xxx. It includes more than For details on how to use Hudi, please look at the quick start page located at https://hudi.apache.org/docs/quick-start-guide.html If you'd like to download the source release, you can find it here: https://github.com/apache/hudi/releases/tag/release-<VERSION> You can read more about the release (including release notes) here: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12322822&version=<JIRA_VERSION> We welcome your help and feedback. For more information on how to Thanks to everyone involved! XXX |
Recordkeeping
Use reporter.apache.org to seed the information about the release into future project reports.
Social media
Tweet, post on Facebook, LinkedIn, and other platforms. Ask other contributors to do the same.
Improve the process
It is important that we improve the release processes over time. Once you’ve finished the release, please take a step back and look what areas of this process and be improved. Perhaps some part of the process can be simplified. Perhaps parts of this guide can be clarified.
...