-
Notifications
You must be signed in to change notification settings - Fork 10
docs: document release process #61
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
Open
notfilippo
wants to merge
2
commits into
apache:main
Choose a base branch
from
notfilippo:document-release
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,220 @@ | ||
| <!-- | ||
| 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 for Rust Components | ||
|
|
||
| A streamlined release process that relies on CI for validation and focuses on essential manual steps. | ||
|
|
||
| ## What CI Handles Automatically | ||
|
|
||
| CI validates every commit and ensures: | ||
|
|
||
| - All tests pass on multiple platforms (Linux, macOS, Windows) | ||
| - Code passes linting (`cargo x lint`) | ||
| - Documentation builds successfully | ||
| - Examples run correctly | ||
| - MSRV (Minimum Supported Rust Version) compatibility | ||
|
|
||
| ## Prerequisites (One-Time Setup) | ||
|
|
||
| 1. **crates.io access**: `cargo login` and save your API token | ||
| 2. **GPG setup**: Ensure `gpg-agent` is running and your key is configured | ||
| 3. **SVN access**: Checkout Apache dist directories: | ||
| ```bash | ||
| mkdir -p ~/apache/dist/{dev,release}/datasketches | ||
| cd ~/apache/dist/dev/datasketches | ||
| svn co https://dist.apache.org/repos/dist/dev/datasketches/ . | ||
| cd ~/apache/dist/release/datasketches | ||
| svn co https://dist.apache.org/repos/dist/release/datasketches/ . | ||
| ``` | ||
|
|
||
| ## Step 1: Create Release Candidate Tag | ||
|
|
||
| ```bash | ||
| # Simply tag the current commit as RC | ||
| git checkout main | ||
| git tag -a 0.3.0-RC1 -m "Release candidate 1 for 0.3.0" | ||
| git push origin 0.3.0-RC1 | ||
| ``` | ||
|
|
||
| ## Step 2: Publish Release Candidate to crates.io | ||
|
|
||
| This allows the community to test the actual published crate. | ||
|
|
||
| ```bash | ||
| # Temporarily change version for RC publish (DON'T commit!) | ||
| sed -i '' 's/version = ".*"/version = "0.3.0-rc.1"/' datasketches/Cargo.toml | ||
|
|
||
| # Verify package contents | ||
| cargo package --list -p datasketches | ||
|
|
||
| # Dry run | ||
| cargo publish --dry-run -p datasketches | ||
|
|
||
| # Publish | ||
| cargo publish -p datasketches | ||
|
|
||
| # Revert the temporary change | ||
| git checkout -- datasketches/Cargo.toml Cargo.lock | ||
| ``` | ||
|
|
||
| Verify: Visit https://crates.io/crates/datasketches and confirm `0.3.0-rc.1` is published. | ||
|
|
||
| ## Step 3: Create Signed Source Distribution | ||
|
|
||
| ```bash | ||
| # Navigate to dist scripts (adjust path as needed) | ||
| cd ~/apache/dist/dev/datasketches/scripts | ||
|
|
||
| # Run the packaging script (requires GPG) | ||
| ./bashDeployToDist.sh \ | ||
| /path/to/datasketches-rust \ | ||
| datasketches-rust \ | ||
| 0.3.0-RC1 | ||
| ``` | ||
|
|
||
| This script will: | ||
|
|
||
| 1. Create a source archive from the git tag | ||
| 2. Generate GPG signature (`.asc`) | ||
| 3. Generate SHA512 checksum (`.sha512`) | ||
| 4. Upload to https://dist.apache.org/repos/dist/dev/datasketches/rust/0.3.0-RC1/ | ||
|
|
||
| Verify the files are accessible at the URL above. | ||
|
|
||
| ## Step 4: Send [VOTE] Email | ||
|
|
||
| Send to: dev@datasketches.apache.org | ||
|
|
||
| **Subject:** `[VOTE] Release Apache DataSketches Rust 0.3.0 (RC1)` | ||
|
|
||
| **Email template:** | ||
|
|
||
| ``` | ||
| Hi everyone, | ||
|
|
||
| I propose releasing Apache DataSketches Rust version 0.3.0. | ||
|
|
||
| Source distribution: | ||
| https://dist.apache.org/repos/dist/dev/datasketches/rust/0.3.0-RC1/ | ||
|
|
||
| GitHub tag: | ||
| https://github.com/apache/datasketches-rust/releases/tag/0.3.0-RC1 | ||
|
|
||
| Testing (choose one or both): | ||
| - crates.io RC: cargo add datasketches@0.3.0-rc.1 | ||
| - From source: Download, verify signatures, cargo x test | ||
|
|
||
| To verify signatures: | ||
| curl -O https://dist.apache.org/repos/dist/dev/datasketches/rust/0.3.0-RC1/datasketches-rust-0.3.0-RC1-src | ||
| curl -O https://dist.apache.org/repos/dist/dev/datasketches/rust/0.3.0-RC1/datasketches-rust-0.3.0-RC1-src.asc | ||
| gpg --verify datasketches-rust-0.3.0-RC1-src.asc | ||
|
|
||
| Notable changes: [link to CHANGELOG or summary] | ||
|
|
||
| Vote will remain open for at least 72 hours. | ||
|
|
||
| [ ] +1 approve | ||
| [ ] +0 no opinion | ||
| [ ] -1 disapprove (and reason why) | ||
| ``` | ||
|
|
||
| **Wait 72+ hours.** Need at least 3 +1 PMC votes and more +1s than -1s. | ||
|
|
||
| **If vote fails:** | ||
|
|
||
| ```bash | ||
| # Fix the issues, commit to main, then tag the new RC | ||
| git tag -a 0.3.0-RC2 -m "Release candidate 2 for 0.3.0" | ||
| git push origin 0.3.0-RC2 | ||
| # Then repeat from Step 2 (with version 0.3.0-RC2) | ||
| ``` | ||
|
|
||
| ## Step 5: Close Vote & Publish Release | ||
|
|
||
| After successful vote, send [VOTE-RESULT] email summarizing the outcome and proceed to publish the release: | ||
|
|
||
| ```bash | ||
| # Move artifacts from dev to release | ||
| cd ~/apache/dist/dev/datasketches/scripts | ||
| ./moveDevToRelease.sh rust 0.3.0-RC1 0.3.0 | ||
|
|
||
| # Update Cargo.toml to final release version (this is the only version commit!) | ||
| cd /path/to/datasketches-rust | ||
| git checkout main | ||
| sed -i '' 's/version = ".*"/version = "0.3.0"/' datasketches/Cargo.toml | ||
| git add datasketches/Cargo.toml | ||
| git commit -m "chore: release 0.3.0" | ||
| git push origin main | ||
|
|
||
| # Create final release tag | ||
| git tag -a 0.3.0 -m "Release version 0.3.0" | ||
| git push origin 0.3.0 | ||
|
|
||
| # Publish final version to crates.io | ||
| cargo publish --dry-run -p datasketches | ||
| cargo publish -p datasketches | ||
| ``` | ||
|
|
||
| ## Step 6: Create GitHub Release | ||
|
|
||
| Go to https://github.com/apache/datasketches-rust/releases and draft a new release. | ||
|
|
||
| ## Step 7: Post-Release Housekeeping | ||
|
|
||
| 1. **Update website**: | ||
| ```bash | ||
| cd ~/apache/dist/dev/datasketches/scripts | ||
| ./createDownloadsInclude.sh /path/to/datasketches-website | ||
| ``` | ||
|
|
||
| 2. **Clean up old releases** from dist (keep only latest): | ||
| ```bash | ||
| cd ~/apache/dist/release/datasketches | ||
| svn rm rust/0.2.0 | ||
| svn commit -m "Archive old release 0.2.0" | ||
| ``` | ||
|
|
||
| 3. **Send [ANNOUNCE] email** after 24 hours (allows mirror propagation): | ||
| - To: dev@datasketches.apache.org, announce@apache.org | ||
| - Include links to: GitHub release, crates.io, docs.rs, Apache dist | ||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **Need to yank a crate?** | ||
|
|
||
| ```bash | ||
| cargo yank --vers 0.3.0-RC1 datasketches | ||
| ``` | ||
|
|
||
| Only for broken pre-releases. For released versions, publish a patch instead. | ||
|
|
||
| **GPG issues?** | ||
|
|
||
| - Ensure key is in KEYS file and uploaded to public keyservers | ||
| - Check `gpg-agent` is running: `ps aux | grep gpg-agent` | ||
| - Try: `eval $(gpg-agent --daemon)` | ||
|
|
||
| **crates.io publish fails?** | ||
|
|
||
| - Verify `cargo login` is current | ||
| - Check package size: `cargo package --list -p datasketches` | ||
| - Ensure all dependencies are published |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to me following the release process commands to double check the functionality.