|
| 1 | +<!--- |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the |
| 7 | + "License"); you may not use this file except in compliance |
| 8 | + with the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + KIND, either express or implied. See the License for the |
| 16 | + specific language governing permissions and limitations |
| 17 | + under the License. |
| 18 | +--> |
| 19 | + |
| 20 | +# Release Process |
| 21 | + |
| 22 | +This guide is for maintainers creating release candidates of Apache |
| 23 | +DataFusion Java and running the release process. |
| 24 | + |
| 25 | +## Release Prerequisites |
| 26 | + |
| 27 | +### Add a git remote for the `apache` repo |
| 28 | + |
| 29 | +The instructions below assume the upstream git repo |
| 30 | +`git@github.com:apache/datafusion-java.git` is configured as the remote |
| 31 | +named `apache`: |
| 32 | + |
| 33 | +```shell |
| 34 | +git remote add apache git@github.com:apache/datafusion-java.git |
| 35 | +``` |
| 36 | + |
| 37 | +### Add your GPG public key to the SVN `KEYS` file |
| 38 | + |
| 39 | +If you will be releasing the final tarball, your GPG public key must be |
| 40 | +present in: |
| 41 | + |
| 42 | +- https://dist.apache.org/repos/dist/dev/datafusion/KEYS |
| 43 | +- https://dist.apache.org/repos/dist/release/datafusion/KEYS |
| 44 | + |
| 45 | +See https://infra.apache.org/release-signing.html#generate for generating |
| 46 | +keys. |
| 47 | + |
| 48 | +Committers can add signing keys via Subversion using their ASF account: |
| 49 | + |
| 50 | +```shell |
| 51 | +svn co https://dist.apache.org/repos/dist/dev/datafusion |
| 52 | +cd datafusion |
| 53 | +(gpg --list-sigs "Your Name" && gpg --armor --export "Your Name") >> KEYS |
| 54 | +svn commit KEYS -m "Add key for Your Name" |
| 55 | +``` |
| 56 | + |
| 57 | +## Release Process: Step by Step |
| 58 | + |
| 59 | +As part of the Apache governance model, official releases consist of |
| 60 | +signed source tarballs approved by the PMC. |
| 61 | + |
| 62 | +### 1. Pick a Release Candidate (RC) number |
| 63 | + |
| 64 | +Pick numbers in sequential order, with `1` for `rc1`, `2` for `rc2`, and |
| 65 | +so on. |
| 66 | + |
| 67 | +### 2. Create the Git tag for the Release Candidate |
| 68 | + |
| 69 | +Release tags look like `0.1.0`, and release candidate tags look like |
| 70 | +`0.1.0-rc1`. |
| 71 | + |
| 72 | +```shell |
| 73 | +git fetch apache |
| 74 | +git tag 0.1.0-rc1 apache/main |
| 75 | +git push apache 0.1.0-rc1 |
| 76 | +``` |
| 77 | + |
| 78 | +### 3. Create, sign, and upload the tarball |
| 79 | + |
| 80 | +Run `create-tarball.sh` with the version and RC number: |
| 81 | + |
| 82 | +```shell |
| 83 | +./dev/release/create-tarball.sh 0.1.0 1 |
| 84 | +``` |
| 85 | + |
| 86 | +The script: |
| 87 | + |
| 88 | +1. Creates and uploads the release candidate artifacts to the |
| 89 | + [`dist/dev/datafusion`](https://dist.apache.org/repos/dist/dev/datafusion) |
| 90 | + location on the Apache SVN distribution server, under |
| 91 | + `apache-datafusion-java-<version>-rc<rc>/`. |
| 92 | +2. Prints an email template to send to `dev@datafusion.apache.org` for |
| 93 | + the release vote. |
| 94 | + |
| 95 | +### 4. Vote on the Release Candidate |
| 96 | + |
| 97 | +Send the email printed by the script to `dev@datafusion.apache.org`. |
| 98 | + |
| 99 | +The vote must remain open for at least 72 hours and requires at least |
| 100 | +three PMC `+1` votes and no `-1` votes to pass. |
| 101 | + |
| 102 | +### Verifying Release Candidates |
| 103 | + |
| 104 | +`dev/release/verify-release-candidate.sh` downloads the candidate |
| 105 | +tarball, verifies its signature and checksums, and builds and tests the |
| 106 | +source distribution: |
| 107 | + |
| 108 | +```shell |
| 109 | +./dev/release/verify-release-candidate.sh 0.1.0 1 |
| 110 | +``` |
| 111 | + |
| 112 | +The script requires `curl`, `git`, `gpg`, a C toolchain, `java`, and |
| 113 | +either `shasum` or `sha256sum`/`sha512sum` to be on the `PATH`. It will |
| 114 | +install a temporary Rust toolchain into the sandbox directory. |
| 115 | + |
| 116 | +### 5. If the Vote Passes: Promote the Tarball |
| 117 | + |
| 118 | +Move artifacts from the `dev` SVN area to the `release` area using |
| 119 | +`release-tarball.sh`: |
| 120 | + |
| 121 | +```shell |
| 122 | +./dev/release/release-tarball.sh 0.1.0 1 |
| 123 | +``` |
| 124 | + |
| 125 | +### 6. Create the Release Git Tag |
| 126 | + |
| 127 | +Tag the same release candidate commit with the final release tag: |
| 128 | + |
| 129 | +```shell |
| 130 | +git checkout 0.1.0-rc1 |
| 131 | +git tag 0.1.0 |
| 132 | +git push apache 0.1.0 |
| 133 | +``` |
| 134 | + |
| 135 | +### 7. Add the Release to Apache Reporter |
| 136 | + |
| 137 | +Add the release at https://reporter.apache.org/addrelease.html?datafusion |
| 138 | +so it appears in the project's board report. |
| 139 | + |
| 140 | +### 8. Delete Old RCs and Releases |
| 141 | + |
| 142 | +See the ASF documentation on [when to |
| 143 | +archive](https://www.apache.org/legal/release-policy.html#when-to-archive). |
| 144 | + |
| 145 | +Release candidates should be deleted once the release is published: |
| 146 | + |
| 147 | +```shell |
| 148 | +svn ls https://dist.apache.org/repos/dist/dev/datafusion | grep datafusion-java |
| 149 | +svn delete -m "delete old DataFusion Java RC" \ |
| 150 | + https://dist.apache.org/repos/dist/dev/datafusion/apache-datafusion-java-0.1.0-rc1/ |
| 151 | +``` |
| 152 | + |
| 153 | +Only the latest release should remain in the `release` SVN area. Delete |
| 154 | +older releases after publishing a new one: |
| 155 | + |
| 156 | +```shell |
| 157 | +svn ls https://dist.apache.org/repos/dist/release/datafusion | grep datafusion-java |
| 158 | +svn delete -m "delete old DataFusion Java release" \ |
| 159 | + https://dist.apache.org/repos/dist/release/datafusion/datafusion-java-0.1.0 |
| 160 | +``` |
0 commit comments