|
17 | 17 | under the License.
|
18 | 18 | -->
|
19 | 19 |
|
20 |
| -See instructions in [`/dev/release/README.md`](../../../dev/release/README.md) |
| 20 | + |
| 21 | +# Release Process |
| 22 | + |
| 23 | +## Overview |
| 24 | + |
| 25 | +This file documents the release process for the `object_store` crate. |
| 26 | + |
| 27 | +At the time of writing, we release a new version of `object_store` on demand rather than on a regular schedule. |
| 28 | + |
| 29 | +As we are still in an early phase, we use the 0.x version scheme. If any code has |
| 30 | +been merged to master that has a breaking API change, as defined in [Rust RFC 1105] |
| 31 | +the minor version number is incremented changed (e.g. `0.3.0` to `0.4.0`). |
| 32 | +Otherwise the patch version is incremented (e.g. `0.3.0` to `0.3.1`). |
| 33 | + |
| 34 | +[Rust RFC 1105]: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md |
| 35 | +# Release Mechanics |
| 36 | + |
| 37 | +## Process Overview |
| 38 | + |
| 39 | +As part of the Apache governance model, official releases consist of |
| 40 | +signed source tarballs approved by the PMC. |
| 41 | + |
| 42 | +We then use the code in the approved source tarball to release to |
| 43 | +crates.io, the Rust ecosystem's package manager. |
| 44 | + |
| 45 | +We create a `CHANGELOG.md` so our users know what has been changed between releases. |
| 46 | + |
| 47 | +The CHANGELOG is created automatically using |
| 48 | +[update_change_log.sh](https://github.com/apache/arrow-rs/blob/master/object_store/dev/release/update_change_log.sh) |
| 49 | + |
| 50 | +This script creates a changelog using github issues and the |
| 51 | +labels associated with them. |
| 52 | + |
| 53 | +## Prepare CHANGELOG and version: |
| 54 | + |
| 55 | +Now prepare a PR to update `CHANGELOG.md` and versions on `master` to reflect the planned release. |
| 56 | + |
| 57 | +Note this process is done in the `object_store` directory. See [#6227] for an example |
| 58 | + |
| 59 | +[#6227]: https://github.com/apache/arrow-rs/pull/6227 |
| 60 | + |
| 61 | +```bash |
| 62 | +# NOTE: Run commands in object_store sub directory (not main repo checkout) |
| 63 | +# cd object_store |
| 64 | + |
| 65 | +git checkout master |
| 66 | +git pull |
| 67 | +git checkout -b <RELEASE_BRANCH> |
| 68 | + |
| 69 | +# Update versions. Make sure to run it before the next step since we do not want CHANGELOG-old.md affected. |
| 70 | +sed -i '' -e 's/0.11.0/0.11.1/g' `find . -name 'Cargo.toml' -or -name '*.md' | grep -v CHANGELOG` |
| 71 | +git commit -a -m 'Update version' |
| 72 | + |
| 73 | +# ensure your github token is available |
| 74 | +export CHANGELOG_GITHUB_TOKEN=<TOKEN> |
| 75 | + |
| 76 | +# manually edit ./dev/release/update_change_log.sh to reflect the release version |
| 77 | +# create the changelog |
| 78 | +./dev/release/update_change_log.sh |
| 79 | + |
| 80 | +# review change log / and edit associated issues and labels if needed, rerun update_change_log.sh |
| 81 | + |
| 82 | +# Commit changes |
| 83 | +git commit -a -m 'Create changelog' |
| 84 | + |
| 85 | +# push changes to fork and create a PR to master |
| 86 | +git push |
| 87 | +``` |
| 88 | + |
| 89 | +Note that when reviewing the change log, rather than editing the |
| 90 | +`CHANGELOG.md`, it is preferred to update the issues and their labels |
| 91 | +(e.g. add `invalid` label to exclude them from release notes) |
| 92 | + |
| 93 | +Merge this PR to `master` prior to the next step. |
| 94 | + |
| 95 | +## Prepare release candidate tarball |
| 96 | + |
| 97 | +After you have merged the updates to the `CHANGELOG` and version, |
| 98 | +create a release candidate using the following steps. Note you need to |
| 99 | +be a committer to run these scripts as they upload to the apache `svn` |
| 100 | +distribution servers. |
| 101 | + |
| 102 | +### Create git tag for the release: |
| 103 | + |
| 104 | +While the official release artifact is a signed tarball, we also tag the commit it was created for convenience and code archaeology. |
| 105 | + |
| 106 | +For `object_store` releases, use a string such as `object_store_0.4.0` as the `<version>`. |
| 107 | + |
| 108 | +Create and push the tag thusly: |
| 109 | + |
| 110 | +```shell |
| 111 | +git fetch apache |
| 112 | +git tag <version> apache/master |
| 113 | +# push tag to apache |
| 114 | +git push apache <version> |
| 115 | +``` |
| 116 | + |
| 117 | +### Pick an Release Candidate (RC) number |
| 118 | + |
| 119 | +Pick numbers in sequential order, with `1` for `rc1`, `2` for `rc2`, etc. |
| 120 | + |
| 121 | +### Create, sign, and upload tarball |
| 122 | + |
| 123 | +Run `create-tarball.sh` with the `<version>` tag and `<rc>` and you found in previous steps. |
| 124 | + |
| 125 | +```shell |
| 126 | +./object_store/dev/release/create-tarball.sh 0.11.1 1 |
| 127 | +``` |
| 128 | + |
| 129 | +The `create-tarball.sh` script |
| 130 | + |
| 131 | +1. creates and uploads a release candidate tarball to the [arrow |
| 132 | + dev](https://dist.apache.org/repos/dist/dev/arrow) location on the |
| 133 | + apache distribution svn server |
| 134 | + |
| 135 | +2. provide you an email template to |
| 136 | + send to [email protected] for release voting. |
| 137 | + |
| 138 | +### Vote on Release Candidate tarball |
| 139 | + |
| 140 | +Send an email, based on the output from the script to [email protected]. The email should look like |
| 141 | + |
| 142 | +``` |
| 143 | +Draft email for [email protected] mailing list |
| 144 | +
|
| 145 | +--------------------------------------------------------- |
| 146 | + |
| 147 | +Subject: [VOTE][RUST] Release Apache Arrow Rust Object Store 0.11.1 RC1 |
| 148 | +
|
| 149 | +Hi, |
| 150 | +
|
| 151 | +I would like to propose a release of Apache Arrow Rust Object |
| 152 | +Store Implementation, version 0.11.1. |
| 153 | +
|
| 154 | +This release candidate is based on commit: b945b15de9085f5961a478d4f35b0c5c3427e248 [1] |
| 155 | +
|
| 156 | +The proposed release tarball and signatures are hosted at [2]. |
| 157 | +
|
| 158 | +The changelog is located at [3]. |
| 159 | +
|
| 160 | +Please download, verify checksums and signatures, run the unit tests, |
| 161 | +and vote on the release. There is a script [4] that automates some of |
| 162 | +the verification. |
| 163 | +
|
| 164 | +The vote will be open for at least 72 hours. |
| 165 | +
|
| 166 | +[ ] +1 Release this as Apache Arrow Rust Object Store |
| 167 | +[ ] +0 |
| 168 | +[ ] -1 Do not release this as Apache Arrow Rust Object Store because... |
| 169 | +
|
| 170 | +[1]: https://github.com/apache/arrow-rs/tree/b945b15de9085f5961a478d4f35b0c5c3427e248 |
| 171 | +[2]: https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-object-store-rs-0.11.1-rc1 |
| 172 | +[3]: https://github.com/apache/arrow-rs/blob/b945b15de9085f5961a478d4f35b0c5c3427e248/object_store/CHANGELOG.md |
| 173 | +[4]: https://github.com/apache/arrow-rs/blob/master/object_store/dev/release/verify-release-candidate.sh |
| 174 | +``` |
| 175 | + |
| 176 | +For the release to become "official" it needs at least three Apache Arrow PMC members to vote +1 on it. |
| 177 | + |
| 178 | +## Verifying release candidates |
| 179 | + |
| 180 | +The `object_store/dev/release/verify-release-candidate.sh` script can assist in the verification process. Run it like: |
| 181 | + |
| 182 | +``` |
| 183 | +./object_store/dev/release/verify-release-candidate.sh 0.11.0 1 |
| 184 | +``` |
| 185 | + |
| 186 | +#### If the release is not approved |
| 187 | + |
| 188 | +If the release is not approved, fix whatever the problem is and try again with the next RC number |
| 189 | + |
| 190 | +### If the release is approved, |
| 191 | + |
| 192 | +Move tarball to the release location in SVN, e.g. https://dist.apache.org/repos/dist/release/arrow/arrow-4.1.0/, using the `release-tarball.sh` script: |
| 193 | + |
| 194 | + |
| 195 | +```shell |
| 196 | +./object_store/dev/release/release-tarball.sh 4.1.0 2 |
| 197 | +``` |
| 198 | + |
| 199 | +Congratulations! The release is now official! |
| 200 | + |
| 201 | +### Publish on Crates.io |
| 202 | + |
| 203 | +Only approved releases of the tarball should be published to |
| 204 | +crates.io, in order to conform to Apache Software Foundation |
| 205 | +governance standards. |
| 206 | + |
| 207 | +An Arrow committer can publish this crate after an official project release has |
| 208 | +been made to crates.io using the following instructions. |
| 209 | + |
| 210 | +Follow [these |
| 211 | +instructions](https://doc.rust-lang.org/cargo/reference/publishing.html) to |
| 212 | +create an account and login to crates.io before asking to be added as an owner |
| 213 | +of the [arrow crate](https://crates.io/crates/arrow). |
| 214 | + |
| 215 | +Download and unpack the official release tarball |
| 216 | + |
| 217 | +Verify that the Cargo.toml in the tarball contains the correct version |
| 218 | +(e.g. `version = "0.11.0"`) and then publish the crate with the |
| 219 | +following commands |
| 220 | + |
| 221 | + |
| 222 | +```shell |
| 223 | +cargo publish |
| 224 | +``` |
| 225 | + |
0 commit comments