Skip to content

Commit cbd31e7

Browse files
Update the release process for versioning (#91)
### Motivation Adopt the same versioning rule with the Node.js client, see apache/pulsar-client-node#287. Add an extra step to commit the version update directly before pushing the tag. For example, fda5086
1 parent cff12ea commit cbd31e7

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

RELEASE.md

+31-20
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,16 @@
2323

2424
This page contains instructions for Pulsar committers on how to perform a release for the Pulsar Python client.
2525

26-
## Preparation
26+
## Versioning
27+
Bump up the version number as follows.
2728

28-
> **Note**
29-
>
30-
> The term `major/minor releases` used throughout this document is defined as follows:
31-
> - Major releases refer to feature releases, such as 3.0.0, 3.1.0, and so on.
32-
> - Minor releases refer to bug-fix releases, such as 3.0.1, 3.0.2, and so on.
33-
>
34-
> This guide use `X.Y.Z` or `X.Y` to represent the actual versions like `3.0.0` or `3.0`.
35-
36-
For major releases, you should create a new branch named `branch-X.Y` once all PRs with the X.Y.0 milestone are merged. If some PRs with the X.Y.0 milestone are still working in progress and might take much time to complete, you can move them to the next milestone if they are not important. In this case, you'd better notify the author in the PR.
37-
38-
For minor releases, if there are no disagreements, you should cherry-pick all merged PRs with the `release/X.Y.Z` labels into `branch-X.Y`. After these PRs are cherry-picked, you should add the `cherry-picked/branch-X.Y` labels.
39-
40-
Sometimes some PRs cannot be cherry-picked cleanly, you might need to create a separate PR and move the `release/X.Y.Z` label from the original PR to it. In this case, you can ask the author to help create the new PR.
41-
42-
For PRs that are still open, you can choose to delay them to the next release or ping other committers to review so that they can be merged.
29+
* Major version (e.g. 3.0.0 => 4.0.0)
30+
* Changes that break backward compatibility
31+
* Minor version (e.g. 3.0.0 => 3.1.0)
32+
* Backward compatible new features
33+
* Patch version (e.g. 3.0.0 => 3.0.1)
34+
* Backward compatible bug fixes
35+
* C++ Client upgrade (even though there are no new commits in the Python client)
4336

4437
## Requirements
4538

@@ -55,12 +48,30 @@ Example: https://github.com/apache/pulsar-client-python/pull/62
5548

5649
After all necessary PRs are cherry-picked to `branch-X.Y`, you should cut the release by pushing a tag.
5750

51+
For major and minor releases (`X.Y.0`), you need to create a new branch:
52+
53+
```bash
54+
git checkout -b branch-X.Y
55+
sed -i 's/__version__.*/__version__=X.Y.0/' pulsar/__about__.py
56+
git add pulsar/__about__.py
57+
git commit -m "Bump version to X.Y.0"
58+
git push origin branch-X.Y
59+
# N starts with 1
60+
git tag vX.Y.0-candidate-N
61+
git push origin vX.Y.0-candidate-N
62+
```
63+
64+
For patch releases (`X.Y.Z`), you need to reuse the existing branch:
65+
5866
```bash
5967
git checkout branch-X.Y
68+
sed -i 's/__version__.*/__version__=X.Y.Z/' pulsar/__about__.py
69+
git add pulsar/__about__.py
70+
git commit -m "Bump version to X.Y.Z"
6071
git push origin branch-X.Y
6172
# N starts with 1
62-
git tag vX.Y.Y-candidate-N
63-
git push origin vX.Y.Y-candidate-N
73+
git tag vX.Y.Z-candidate-N
74+
git push origin vX.Y.Z-candidate-N
6475
```
6576

6677
Then, [create a new milestone](https://github.com/apache/pulsar-client-python/milestones/new) for the next major release.
@@ -103,7 +114,7 @@ Send an email to [email protected] to start the vote for the candidate:
103114
104115
Subject: [VOTE] Pulsar Client Python Release X.Y.Z Candidate N
105116
106-
This is the third release candidate for Apache Pulsar Client Python,
117+
This is the Nth release candidate for Apache Pulsar Client Python,
107118
version X.Y.Z.
108119
109120
It fixes the following issues:
@@ -115,7 +126,7 @@ stay open for at least 72 hours ***
115126
Python wheels:
116127
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-python-X.Y.Z-candidate-N/
117128
118-
The supported python versions are 3.7, 3.8, 3.9 and 3.10. The
129+
The supported python versions are 3.7, 3.8, 3.9, 3.10 and 3.11. The
119130
supported platforms and architectures are:
120131
- Windows x86_64 (windows/)
121132
- glibc-based Linux x86_64 (linux-glibc-x86_64/)

0 commit comments

Comments
 (0)