-
Notifications
You must be signed in to change notification settings - Fork 62
How to release
Before describing the release process, it is necessary to understand how this repository is organized.
In pravega-samples
, the main branch is dev
: all the pull requests with new code changes should target dev
branch. This differs from other repositories (e.g., pravega
), where the main branch is master
. On the other hand, master
branch in pravega-samples
mirrors the state of the highest available release. The main reason for this is that we want users cloning this repository to work by default with the most recent release of both pravega
and the pravega-flink/hadoop-connectors
.
Preparing the branch consists of making any necessary changes to the branch you will be working on as part of releasing. There are two possible situations:
-
Major release: This is a change to either the first or the middle digit, and it requires a new release branch.
-
Bug-fix release: This is a minor release version over an existing release branch
Important: At the moment, the release of pravega-samples
depends on the release of pravega
, flink-connectors
, hadoop-connectors
, and pravega-keycloak
. Please, do not start the release process until such dependencies have been released.
Here we describe the steps to create a major release. Let's assume that the version we want to release is x.y.0
.
- Tag the current commit point of the
dev
branch:
git checkout dev
git tag branch-x.y
git push origin branch-x.y
-
Create an issue to update
dev
branch artifacts to the release version. At the moment, the artifacts version ingradle.properties
should be of the formx.y.0-abc-SNAPSHOT
. This issue should describe the need to change the artifacts to its release formx.y.0
. For an example, please look this one. -
Create a PR addressing the previous issue. That is, from your own fork and assuming that your local
your_fork:dev
branch is in sync withpravega-samples:dev
branch, the PR should updategradle.properties
:
pravegaVersion=x.y.0
pravegaKeycloakVersion=x.y.0
flinkConnectorVersion=x.y.0
samplesVersion=x.y.0
hadoopConnectorVersion=x.y.0
For an example, please have a look to this PR.
-
Create an issue to denote the need for creating a new release branch
rx.y
. You can see an example here. -
Address the previous issue by creating a release branch and tagging it:
git pull
git checkout -b rx.y
git push origin rx.y
git checkout rx.y
git tag vx.y.0
git push origin vx.y.0
-
Create release candidate on GitHub. On the GitHub repository page, go to releases and create a new draft. Fill out the recently created tag
vx.y.0
and then fill the title and short release notes. -
Publish the release candidate from GitHub. Once this is all done, publish the release candidate by clicking on the button on the draft page.
-
At the beginning of this page, we mentioned that the
pravega-samples:master
branch should reflect the state of the release with the highest number. As this is a major release, this must be the highest release number. Therefore, we need to create an issue to merge the release branchrx.y
intomaster
. -
Create a PR to address the previous issue. One way to approach this is to synchronize your local fork to be sure that you see branch
local_fork:r0.3
. Then, create a PR fromlocal_fork:r0.3
topravega-samples:master
. This will updatepravega-samples:master
with all the code changed fromdev
and the correct release artifact version ingradle.properties
. Very important: We want to keep the same history of commits indev
andmaster
. For this reason, when merging the changes fromdev
tomaster
, do it with theMERGE COMMIT
option (if you doSQUASH AND MERGE
, all the ids for the commits will differ betweenmaster
anddev
, and this will make impossible to merge again changes fromdev
tomaster
cleanly). -
Create a new issue to update
dev
branch to the artifacts for the new major version to come. You can see an example here. -
Create a PR to address the previous issue. This PR should at least update
gradle.properties
ofpravega_samples:dev
branch as follows:
samplesVersion=x.(y+1).0-SNAPSHOT
or
samplesVersion=(x+1).0.0-SNAPSHOT
Depending on the new version number to come.
Moreover, normally the artifact from the other projects would have been updated as well. For this reason, we can update the snapshot version for the Pravega components as follows (assuming new version is x.(y+1).0
):
pravegaVersion=x.(y+1).0-abc-SNAPSHOT
pravegaKeycloakVersion=x.(y+1).0-abc-SNAPSHOT
flinkConnectorVersion=x.(y+1).0-abc-SNAPSHOT
hadoopConnectorVersion=x.(y+1).0-abc-SNAPSHOT
The actual artifact id (x.(y+1).0-abc-SNAPSHOT
) is available in the Pravega jFrog repository where snapshots are published. Please, check the most recent version to correctly set these values for each artifact.
In a bugfix release, we work on top of the release branch created in a previous major release rx.y
. The objective is to update the existing branch to a new tag vx.y.(z+1)
and cherry-pick changed from dev
branch in the case it is necessary. The steps are the following:
-
Create an issue to update
gradle.properties
in branchrx.y
fromx.y.z
tox.y.(z+1)
. For an example, please look at this issue. -
Create a PR addressing the previous issue and update
gradle.properties
:
pravegaVersion=x.y.z -> x.y.(z+1)
pravegaKeycloakVersion=x.y.z -> x.y.(z+1)
flinkConnectorVersion=x.y.z -> x.y.(z+1)
samplesVersion=x.y.z -> x.y.(z+1)
For an example, we refer to this PR.
-
(Optional) This is an optional step in the case you want to add some code changes from
dev
branch torx.y
branch (not always necessary). In the affirmative case, create a new issue describing the commits fromdev
branch that should be integrated inrx.y
. -
(Only if previous step is done) Synchronize your
local_fork:r0.3
withpravega-samples:r0.3
and then performgit cherry-pick {commit_id}
on all the commits you want to include in this bugfix release frompravega-samples:dev
. Note that the commit ids should be cherry-picked sequentially from the oldest to the newest, in the case that there are multiple commits to be integrated. Create a new PR fromlocal_fork:r0.3
targetingpravega-samples:r0.3
including all the cherry-picked commits. -
After merging the previous PR, tag the current release branch
rx.y
asvx.y.(z+1)
. Thus, assuming that you are cloningpravega-samples
(which is whereorigin
points to):
git tag vx.y.(z+1)
git push origin vx.y.(z+1)
-
Create release candidate on GitHub. On the GitHub repository page, go to releases and create a new draft. Fill out the recently created tag
vx.y.(z+1)
and then fill the title and short release notes. -
Publish the release candidate from GitHub. Once this is all done, publish the release candidate by clicking on the button on the draft page.
-
(Optional) As defined at the beginning of this page, the
pravega-samples:master
branch should reflect the state of the release with highest version number. Therefore, if the bugfix release version is the highest one, then we should mirror the state ofr0.3
inmaster
. First, create an issue that describes this task as this one. -
(Only if previous step is done) Create a PR to address the previous issue. One way to approach this is to synchronize your local fork to be sure that you see branch
local_fork:r0.3
. Then, create a PR fromlocal_fork:r0.3
topravega-samples:master
. This will updatepravega-samples:master
with all the code changed inr0.3
and the correct release artifact version ingradle.properties
. You can see an example here. Very important: We want to keep the same history of commits indev
andmaster
. For this reason, when merging the changes fromdev
/release_branch
tomaster
, do it with theMERGE COMMIT
option (if you doSQUASH AND MERGE
, all the ids for the commits will differ betweenmaster
anddev
, and this will make impossible to merge again changes fromdev
tomaster
cleanly). -
Create a new issue to update
pravega-samples:rx.y
branch to increasesamplesVersion
ingradle.properties
. You can see an example here. -
Create a PR to address the previous issue. This PR should at least update
gradle.properties
ofpravega_samples:rx.y
branch as follows:
samplesVersion=x.y.(z+2)-SNAPSHOT
For an example, please have a look at this PR.