Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Bump pulsar to 2.6.2.0 (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
BewareMyPower authored Nov 4, 2020
1 parent ff23b57 commit 469314c
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 13 deletions.
45 changes: 37 additions & 8 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ There has two type of the tags, one is stable `vX.Y.Z(.M)`, and another is unsta
3. Update the project version and tag
4. Build the artifacts
5. Verify the artifacts
6. Move master branch to the next version
6. Release the artifacts using streamnative-ci
7. Write release notes
8. Overwrite the branch
9. Move master branch to the next version

## Steps in detail

1. Prepare for a release

Create a new milestone and move the pull requests that can not be published in this release to the new milestone.
Create a new milestone and move the pull requests that can not be published in this release to the new milestone.

2. Create the release branch

Expand All @@ -40,10 +42,9 @@ There has two type of the tags, one is stable `vX.Y.Z(.M)`, and another is unsta

3. Update the project version and tag

> If the dependency of Apache Pulsar needs to change, i.e. the project version was from `X1.Y1.Z1.M` to `X2.Y2.Z2.0`, you should change the dependency of Apache Pulsar first.
```bash
$ ./scripts/set-project-version.sh X.Y.Z.M
$ ./scripts/set-pulsar-version.sh X.Y.Z.M
$ git commit -m "Release X.Y.Z.M" -a
$ git push origin branch-X.Y.Z
$ git tag vX.Y.Z.M
Expand Down Expand Up @@ -71,12 +72,19 @@ There has two type of the tags, one is stable `vX.Y.Z(.M)`, and another is unsta

Then you should push a PR to merge `branch-X.Y.Z` to `master` for running CI tests using Github Actions.

6. Move master branch to the next version
If the verification failed, which may be caused by the incompatibility with new Pulsar version, we need to add more commits to fix it.

6. Release the artifacts using streamnative-ci

After the PR being merged to `master`, you can use streamnative-ci to release the artifacts.

```bash
$ git checkout master
$ ./scripts/set-project-version.sh X.Y.Z-SNAPSHOT
$ git commit -m 'Bumped version to X.Y.Z-SNAPSHOT' -a
$ git clone https://github.com/streamnative/streamnative-ci.git
$ cd streamnative-ci
$ git checkout release
$ git commit --allow-empty -m "/snbot release kop X.Y.Z.M"
$ git push origin release
# Then, you can see the release process: https://github.com/streamnative/streamnative-ci/actions
```

7. Write release notes
Expand All @@ -87,3 +95,24 @@ There has two type of the tags, one is stable `vX.Y.Z(.M)`, and another is unsta

- Feature
- Bug fixed

8. Overwrite the branch

Because the PR may contain multiple commits that will be squashed to a single commit, we need to overwrite the branch after the release.

```bash
$ git clone [email protected]:streamnative/kop.git
$ cd kop
$ git checkout -b branch-X.Y.Z
$ git push origin branch-X.Y.Z -f
```

9. Move master branch to the next version

```bash
$ git checkout -b bump-master
$ ./scripts/set-project-version.sh X.Y.Z-SNAPSHOT
$ git commit -m 'Bumped version to X.Y.Z-SNAPSHOT' -a
$ git push origin bump-master
# create a PR for this change
```
2 changes: 1 addition & 1 deletion kafka-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.streamnative.pulsar.handlers</groupId>
<artifactId>pulsar-protocol-handler-kafka-parent</artifactId>
<version>0.3.1-SNAPSHOT</version>
<version>2.6.2.0</version>
</parent>

<groupId>io.streamnative.pulsar.handlers</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public void findEntryFailed(ManagedLedgerException exception, Optional<Position>
assertTrue(ex.get());

PersistentMessageExpiryMonitor monitor =
new PersistentMessageExpiryMonitor("topicname", c1.getName(), c1);
new PersistentMessageExpiryMonitor("topicname", c1.getName(), c1, null);
monitor.findEntryFailed(new ManagedLedgerException
.ConcurrentFindCursorPositionException("failed"), Optional.empty(), null);
Field field = monitor.getClass().getDeclaredField("expirationCheckInProgress");
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>io.streamnative.pulsar.handlers</groupId>
<artifactId>pulsar-protocol-handler-kafka-parent</artifactId>
<version>0.3.1-SNAPSHOT</version>
<version>2.6.2.0</version>
<name>StreamNative :: Pulsar Protocol Handler :: KoP Parent</name>
<description>Parent for Kafka on Pulsar implemented using Pulsar Protocol Handler.</description>

Expand All @@ -47,7 +47,7 @@
<log4j2.version>2.13.3</log4j2.version>
<lombok.version>1.18.4</lombok.version>
<mockito.version>2.22.0</mockito.version>
<pulsar.version>2.6.1</pulsar.version>
<pulsar.version>2.6.2.0</pulsar.version>
<slf4j.version>1.7.25</slf4j.version>
<spotbugs-annotations.version>3.1.8</spotbugs-annotations.version>
<testcontainers.version>1.12.5</testcontainers.version>
Expand Down
30 changes: 30 additions & 0 deletions scripts/set-pulsar-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set -e

if [ $# -eq 0 ]; then
echo "Required argument with new pulsar version"
exit 1
fi

NEW_VERSION=$1

# Go to top level project directory
pushd $(dirname "$0")/..

mvn versions:set-property -Dproperty=pulsar.version -DnewVersion=$NEW_VERSION

popd
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.streamnative.pulsar.handlers</groupId>
<artifactId>pulsar-protocol-handler-kafka-parent</artifactId>
<version>0.3.1-SNAPSHOT</version>
<version>2.6.2.0</version>
</parent>

<groupId>io.streamnative.pulsar.handlers</groupId>
Expand Down

0 comments on commit 469314c

Please sign in to comment.