You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/29 09:36:07 UTC

[GitHub] [pulsar-client-python] RobertIndie commented on a diff in pull request #68: Add the release process for Python client

RobertIndie commented on code in PR #68:
URL: https://github.com/apache/pulsar-client-python/pull/68#discussion_r1058843148


##########
RELEASE.md:
##########
@@ -0,0 +1,251 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+
+-->
+
+# Release Process
+
+This page contains instructions for Pulsar committers on how to perform a release for the Pulsar Python client.
+
+## Preparation
+
+> **Note**
+>
+> The term `major/minor releases` used throughout this document is defined as follows:
+> - Major releases refer to feature releases, such as 3.0.0, 3.1.0, and so on.
+> - Minor releases refer to bug-fix releases, such as 3.0.1, 3.0.2, and so on.
+>
+> This guide use `X.Y.Z` or `X.Y` to represent the actual versions like `3.0.0` or `3.0`.
+
+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.
+
+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.
+
+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.
+
+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.
+
+## Requirements
+
+If you haven't already done it, [create and publish the GPG key](https://pulsar.apache.org/contribute/create-gpg-keys/) to sign the release artifacts.
+
+## Upgrade the C++ client dependency
+
+During the development, the C++ client dependency might be downloaded from an unofficial release. But when releasing the Python client, the dependency must be downloaded from an official release. You should modify the base url in [dep-url.sh](./build-support/dep-url.sh).
+
+Example: https://github.com/apache/pulsar-client-python/pull/62 
+
+## Cut the candidate release
+
+After all necessary PRs are cherry-picked to `branch-X.Y`, you should cut the release by pushing a tag.
+
+```bash
+git checkout branch-X.Y
+git push origin branch-X.Y
+# N starts with 1
+git tag vX.Y.Y-candidate-N
+git push origin vX.Y.Y-candidate-N
+```
+
+Then, [create a new milestone](https://github.com/apache/pulsar-client-python/milestones/new) for the next major release.
+
+## Sign and stage the candidate release
+
+After a tag is pushed, a workflow will be triggered to build the Python wheels in GitHub Actions. You can find it in https://github.com/apache/pulsar-client-python/actions/workflows/ci-build-release-wheels.yaml
+
+For example, https://github.com/apache/pulsar-client-python/actions/runs/3709463737 is the workflow of `v3.0.0-candidate-3`, the workflow id is 3709463737. Remember the workflow id, which will be passed as an argument of `stage-release.sh` in the following step. Once the workflow is completed, the wheels will be available for downloading.
+
+Generate a GitHub token by following the guide [here](https://github.com/settings/tokens). The `repo` and `workflow` checkboxes must be selected. Then export the token as the environment variable:
+
+```bash
+export GITHUB_TOKEN=<your-token>
+```
+
+Edit `~/.gnupg/gpg.conf` to ensure the default GPG key is from your Apache mail (`<your-name>@apache.org`):
+
+```
+default-key <key fingerprint>
+```
+
+Make sure `curl`, `jq`, `unzip`, `gpg`, `shasum` commands are available. Then you should run the following commands in an empty directory:
+
+```bash
+svn co https://dist.apache.org/repos/dist/dev/pulsar pulsar-dist-dev-keys --depth empty
+cd pulsar-dist-dev-keys
+svn mkdir pulsar-client-python-X.Y.Z-candidate-N && cd pulsar-client-python-X.Y.Z-candidate-N
+# PROJECT_DIR is the directory of the pulsar-client-python repository 
+$PROJECT_DIR/build-support/stage-release.sh vX.Y.Z-candidate-N $WORKFLOW_ID
+svn add *
+svn ci -m "Staging artifacts and signature for Python client X.Y.Z-candidate-N"
+```
+
+## Start the vote for the candidate
+
+Send an email to dev@pulsar.apache.org to start the vote for the candidate:
+
+```
+To: dev@pulsar.apache.org
+Subject: [VOTE] Pulsar Client Python Release X.Y.Z Candidate N
+
+This is the third release candidate for Apache Pulsar Client Python,
+version X.Y.Z.
+
+It fixes the following issues:
+https://github.com/apache/pulsar-client-python/milestone/<milestone-id>?closed=1
+
+*** Please download, test and vote on this release. This vote will
+stay open for at least 72 hours ***
+
+Python wheels:
+https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-python-X.Y.Z-candidate-N/
+
+The supported python versions are 3.7, 3.8, 3.9 and 3.10. The
+supported platforms and architectures are:
+- Windows x86_64 (windows/)
+- glibc-based Linux x86_64 (linux-glibc-x86_64/)
+- glibc-based Linux arm64 (linux-glibc-arm64/)
+- musl-based Linux x86_64 (linux-musl-x86_64/)
+- musl-based Linux arm64 (linux-musl-arm64/)
+- macOS universal 2 (macos/)
+
+The tag to be voted upon: vX.Y.Z-candidate-N
+(<commit-id>)
+https://github.com/apache/pulsar-client-python/releases/tag/vX.Y.Z-candidate-N
+
+Pulsar's KEYS file containing PGP keys you use to sign the release:
+https://dist.apache.org/repos/dist/dev/pulsar/KEYS
+
+Please download the Python wheels and follow the README to test.
+```
+
+Once there are at least 3 binding +1s, the vote will be ready to close and you can continue the following steps. If there is something wrong with the candidate, you need to fix it and repeat the steps from the **Cut the next candidate** section again.
+
+## Promote the release
+
+Go to the candidate directory (`pulsar-client-python-X.Y.Z-candidate-N`) in the SVN project, rename the source code and its signatures: 
+
+```bash
+svn mv pulsar-client-python-X.Y.Z-candidate-N.tar.gz pulsar-client-python-X.Y.Z.tar.gz

Review Comment:
   Why don't we generate the source tar file without `-candidate-N` suffix?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org