Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update release guide #287

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 67 additions & 52 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@

## Start a tracking issue

Create a tracking issue for the release with title `Tracking issue for release <release version>`. Add the issue to the
Create a tracking issue for the release with title `Tracking issue for release x.y.z`. Add the issue to the
corresponding milestone for the release, and edit the issue description as below.

```markdown
## Tasks

This issue tracks the release process as instructed in the [release guide](https://github.com/apache/hudi-rs/tree/main/release/README.md).

### Issues

- [ ] All other issues in the [release milestone](https://github.com/apache/hudi-rs/milestone/1) should be closed.
Expand Down Expand Up @@ -62,32 +64,7 @@ corresponding milestone for the release, and edit the issue description as below
- [ ] Close this tracking issue and the release milestone
```

## ASF work

### Upload source release to SVN dev

> [!NOTE]
> Make sure you're using a computer that has your code-signing gpg key installed.

Run the below script to create and upload the source release artifacts.

```shell
RELEASE_VER=0.1.0-rc.1

./release/upload_src_release_to_dev.sh $RELEASE_VER ${YOUR CODE-SIGNING KEY ID}
```

Run the below script to verify the source release.

```shell
RELEASE_VER=0.1.0-rc.1

./release/verify_src_release.sh $RELEASE_VER dev
```

Fix any issues if found before proceeding to the next step.

## GitHub work
## Prepare release candidate(s)

> [!NOTE]
> We adhere to [Semantic Versioning](https://semver.org/), and create a release branch for each major or minor release.
Expand All @@ -102,7 +79,7 @@ Execute the below script that creates a branch with the new version changes comm

### Bump version in release branch

> [!NOTE]
> [!IMPORTANT]
> When working on a release branch, use a local clone of `apache/hudi-rs` instead of your own fork.

For a major or minor release, create a release branch in the format of `release/[0-9]+.[0-9]+.x` matching the target
Expand All @@ -122,44 +99,50 @@ On the release branch, bump the version to indicate pre-release by pushing a com
- If it is ready for voting, go with `rc.1`, `rc.2`, etc

```shell
RELEASE_VER=0.2.0-rc.1
RELEASE_VER=x.y.z-rc.1

cargo set-version $RELEASE_VER --manifest-path crates/hudi/Cargo.toml
git commit -am "build(release): bump version to $RELEASE_VER"
```

### Testing

Once the "bump version" commit is pushed, CI will be triggered and all tests need to pass before proceed to the next.
Once the "bump version" commit is pushed, the CI tests will be triggered and running.

Perform any release related tests, such as integration tests, before proceeding to the next step.
> [!IMPORTANT]
> Perform any release related tests in addition to the CI if applicable before proceeding to the next step.

### Generate changelog
### Upload source release to SVN dev

We use [cliff](https://git-cliff.org/) to generate changelogs. Install it by running the below command.
Pick the code-signing gpg key by running

```shell
cargo install git-cliff
gpg --list-secret-keys --keyid-format=long
```

Switch to the release branch (org: apache/hudi-rs), generate a changelog for the release by running the below script.
> [!NOTE]
> Make sure you're using a computer that has your code-signing gpg key installed.

```shell
# specify the previous release version
Run the below script to create and upload the source release artifacts.

# for mac
git cliff release-{previous_release_version}..HEAD | pbcopy
```shell
RELEASE_VER=x.y.z-rc.1

# for linux
git cliff release-{previous_release_version}..HEAD | xclip
./release/upload_src_release_to_dev.sh $RELEASE_VER ${YOUR CODE-SIGNING KEY ID}
```

Paste the changelog output as a comment on the tracking issue.
Run the below script to verify the source release.

### Push tag
```shell
RELEASE_VER=x.y.z-rc.1

./release/verify_src_release.sh $RELEASE_VER dev
```

> [!IMPORTANT]
> The version in the code should be the target release version.
> Fix any issues if found before proceeding to the next step.

### Push tag

Push a tag to the commit that matches to the version in the form of `release-*`. For example,

Expand All @@ -171,14 +154,36 @@ Push a tag to the commit that matches to the version in the form of `release-*`.
> pypi.org, which, if successful, is irreversible. Same versions are not allowed to publish more than once.

```shell
RELEASE_VER=0.1.0-rc.1
RELEASE_VER=x.y.z-rc.1

git tag release-$RELEASE_VER
git push origin release-$RELEASE_VER
```

Once the CI completes, check crates.io and pypi.org for the new release artifacts.

### Generate changelog

We use [cliff](https://git-cliff.org/) to generate changelogs. Install it by running the below command.

```shell
cargo install git-cliff
```

Switch to the release branch (org: apache/hudi-rs), generate a changelog for the release by running the below script.

```shell
# specify the previous release version

# for mac
git cliff release-{previous_release_version}..HEAD | pbcopy

# for linux
git cliff release-{previous_release_version}..HEAD | xclip
```

Paste the changelog output as a comment on the tracking issue.

### Start a `[VOTE]` thread

```text
Expand Down Expand Up @@ -225,28 +230,34 @@ Release Manager
Remove the pre-release suffix from the version in the release branch.

```shell
RELEASE_VER=0.2.0
RELEASE_VER=x.y.z

cargo set-version $RELEASE_VER --manifest-path crates/hudi/Cargo.toml
git commit -am "build(release): bump version to $RELEASE_VER"
```

Wait for the CI to pass before proceeding to the next step.
> [!IMPORTANT]
> Wait for the CI to pass before proceeding to the next step.

### Upload source release to SVN release

Run the below script to create and upload the source release artifacts.

```shell
RELEASE_VER=0.2.0
RELEASE_VER=x.y.z
CODE_SIGNING_KEY=<your code-signing key id>

./release/upload_src_release_to_dev.sh $RELEASE_VER $CODE_SIGNING_KEY

./release/publish_src_release.sh $RELEASE_VER ${YOUR CODE-SIGNING KEY ID}
./release/publish_src_release.sh $RELEASE_VER $CODE_SIGNING_KEY
```

// TODO support verify local copy

Run the below script to verify the source release.

```shell
RELEASE_VER=0.2.0
RELEASE_VER=x.y.z

./release/verify_src_release.sh $RELEASE_VER release
```
Expand All @@ -261,7 +272,7 @@ revert the last version bump commit, fix the reported error, and start a new rel
> pypi.org, which, if successful, is irreversible. Same versions are not allowed to publish more than once.

```shell
RELEASE_VER=0.2.0
RELEASE_VER=x.y.z

git tag release-$RELEASE_VER
git push origin release-$RELEASE_VER
Expand All @@ -273,7 +284,11 @@ Once the CI completes, check crates.io and pypi.org for the new release artifact

Use `git cliff` to prepend the current release's change to `changelog.md` in the main branch.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git commit -am 'chore: update changelog for 0.3.0'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PREVIOUS_RELEASE_VER=

# for mac
git cliff release-$PREVIOUS_RELEASE_VER..HEAD | pbcopy

# for linux
git cliff release-$PREVIOUS_RELEASE_VER..HEAD | xclip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to milestone


Close the tracking issue.
### Publish Release Notes



Close the tracking issue and the milestone.

### Send `ANNOUNCE` email

Expand Down
Loading