Skip to content

Commit

Permalink
Add release refinements from 0.35.2 release (apache#8925)
Browse files Browse the repository at this point in the history
* Add refinements from 0.35.2 release

* Trim whitespace from voter name if voters entered with space after comma (e.g. 'Ville, Andy')

* Reinstate deterministic deps

* Bump copyright date in NOTICE

* Fix incorrect link in README
  • Loading branch information
villebro authored Feb 18, 2020
1 parent c7e2785 commit 3149d8e
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 50 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Superset (incubating)
Copyright 2016-2019 The Apache Software Foundation
Copyright 2016-2020 The Apache Software Foundation

This product includes software developed at The Apache Software
Foundation (http://www.apache.org/).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Contributing
------------

Interested in contributing? Casual hacking? Check out
[Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
[Contributing.MD](https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md)


Who uses Apache Superset (incubating)?
Expand Down
77 changes: 40 additions & 37 deletions RELEASING/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,44 @@ need to be done at every release.
svn commit -m "Add PGP keys of new Superset committer"
```

## Setting up the release environment (do every time)

As the vote process takes a minimum of 72h (community vote) + 72h (IPMC) vote,
often stretching over several weeks calendar time if votes don't pass, chances are
the same terminal session won't be used for crafting the release candidate and the
final release. Therefore, it's a good idea to do the following every time you
work on a new phase of the release process to make sure you aren't releasing
the wrong files/using wrong names. There's a script to help you set correctly all the
necessary environment variables. Change your current directory to `superset/RELEASING`

```bash
# usage: . set_release_env.sh <SUPERSET_VERSION_RC> <PGP_KEY_FULLNAME>
# example: . set_release_env.sh 0.35.2rc1 myid@apache.org
```

The script will output the exported variables. Here's example for 0.35.2rc2:

```
-------------------------------
Set Release env variables
SUPERSET_PGP_FULLNAME=myid@apache.org
SUPERSET_VERSION_RC=0.35.2rc1
SUPERSET_GITHUB_BRANCH=0.35
SUPERSET_TMP_ASF_SITE_PATH=/tmp/incubator-superset-site-0.35.2
SUPERSET_RELEASE_RC=apache-superset-incubating-0.35.2rc1
SUPERSET_RELEASE_RC_TARBALL=apache-superset-incubating-0.35.2rc1-source.tar.gz
SUPERSET_RC=1
SUPERSET_CONFIG_PATH=/Users/ville/superset/superset_config.py
SUPERSET_RELEASE=apache-superset-incubating-0.35.2
SUPERSET_RELEASE_TARBALL=apache-superset-incubating-0.35.2-source.tar.gz
SUPERSET_VERSION=0.35.2
-------------------------------
```

## Crafting a source release

When crafting a new minor or major release we create
a branch named with the release MAJOR.MINOR version (on this example 0.34).
a branch named with the release MAJOR.MINOR version (on this example 0.35).
This new branch will hold all PATCH and release candidates
that belong to the MAJOR.MINOR version.

Expand All @@ -69,53 +103,22 @@ set your GITHUB_TOKEN environment variable.

```bash
# will overwrites the local CHANGELOG.md, somehow you need to merge it in
github-changes -o apache -r incubator-superset --token $GITHUB_TOKEN --between-tags <PREVIOUS_RELEASE_TAG>...<CURRENT_RELEASE_TAG>
github-changes -o apache -r incubator-superset --token $GITHUB_TOKEN -b $SUPERSET_GITHUB_BRANCH
```

Then, in `UPDATING.md`, a file that contains a list of notifications around
deprecations and upgrading-related topics,
make sure to move the content now under the `Next Version` section under a new
section for the new release.

Finally bump the version number on `superset-frontend/package.json`:
Finally bump the version number on `superset-frontend/package.json` (replace with whichever version is being released excluding the RC version):

```json
"version": "0.34.1"
"version": "0.35.2"
```

Commit the change with the version number, then git tag the version with the release candidate and push to the branch

## Setting up the release environment (do every time)

As the vote process takes a minimum of 72h (community vote) + 72h (IPMC) vote,
often stretching over several weeks calendar time if votes don't pass, chances are
the same terminal session won't be used for crafting the release candidate and the
final release. Therefore, it's a good idea to do the following every time you
work on a new phase of the release process to make sure you aren't releasing
the wrong files/using wrong names. There's a script to help you set correctly all the
necessary environment variables. Change your current directory to `superset/RELEASING`

```bash
# usage: set_release_env.sh <SUPERSET_VERSION> <SUPERSET_VERSION_RC> "<PGP_KEY_FULLNAME>"
. ./set_release_env.sh XX.YY.ZZ QQ "YOUR PGP KEY NAME"
```

The script will output the exported variables. Here's example for 0.34.1 RC1:

```
-------------------------------
Set Release env variables
SUPERSET_VERSION=0.34.1
SUPERSET_RC=1
SUPERSET_PGP_FULLNAME=You PGP Key Name
SUPERSET_VERSION_RC=0.34.1rc1
SUPERSET_RELEASE=apache-superset-incubating-0.34.1
SUPERSET_RELEASE_RC=apache-superset-incubating-0.34.1rc1
SUPERSET_RELEASE_TARBALL=apache-superset-incubating-0.34.1-source.tar.gz
SUPERSET_RELEASE_RC_TARBALL=apache-superset-incubating-0.34.1rc1-source.tar.gz
-------------------------------
```

## Preparing the release candidate

The first step of preparing an Apache Release is packaging a release candidate
Expand All @@ -138,7 +141,7 @@ This can be overriden by setting `SUPERSET_SVN_DEV_PATH` environment var to a di

### Build and test the created source tarball

To build and run the just created tarball
To build and run the **local copy** of the recently created tarball:
```bash
# Build and run a release candidate tarball
./test_run_tarball.sh local
Expand All @@ -158,7 +161,7 @@ Now let's ship this RC into svn's dev folder

### Build and test from SVN source tarball

To make a working build given a tarball
To build and run the recently created tarball **from SVN**:
```bash
# Build and run a release candidate tarball
./test_run_tarball.sh
Expand Down
5 changes: 3 additions & 2 deletions RELEASING/make_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ usage() {
}

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
if [ -z "${SUPERSET_VERSION}" ] || [ -z "${SUPERSET_RC}" ] || [ -z "${SUPERSET_PGP_FULLNAME}" ]; then
echo "No parameters found an no required environment variables set"
if [ -z "${SUPERSET_VERSION}" ] || [ -z "${SUPERSET_RC}" ] || [ -z "${SUPERSET_PGP_FULLNAME}" ] || [ -z "${SUPERSET_RELEASE_RC_TARBALL}" ]; then
echo "No parameters found and no required environment variables set"
echo "usage: make_tarball.sh <SUPERSET_VERSION> <SUPERSET_RC> <PGP_KEY_FULLBANE>"
usage;
exit 1
Expand All @@ -32,6 +32,7 @@ else
SUPERSET_VERSION="${1}"
SUPERSET_RC="${2}"
SUPERSET_PGP_FULLNAME="${3}"
SUPERSET_RELEASE_RC_TARBALL="apache-superset-incubating-${SUPERSET_VERSION_RC}-source.tar.gz"
fi

SUPERSET_VERSION_RC="${SUPERSET_VERSION}rc${SUPERSET_RC}"
Expand Down
4 changes: 2 additions & 2 deletions RELEASING/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from typing import List
import smtplib
import ssl
from typing import List

try:
import jinja2
Expand All @@ -39,7 +39,7 @@
def string_comma_to_list(message: str) -> List[str]:
if not message:
return []
return message.split(",")
return [element.strip() for element in message.split(",")]


def send_email(
Expand Down
25 changes: 18 additions & 7 deletions RELEASING/set_release_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,27 @@
# limitations under the License.
#
usage() {
echo "usage: . set_release_env.sh <SUPERSET_VERSION> <SUPERSET_RC> <PGP_KEY_FULLBANE>"
echo "usage: . set_release_env.sh <SUPERSET_RC_VERSION> <PGP_KEY_FULLBANE>"
echo "example: . set_relese_env.sh 0.35.2rc1 myid@apache.org"
}

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
if [ -z "$1" ] || [ -z "$2" ]; then
usage;
else
export SUPERSET_VERSION="${1}"
export SUPERSET_RC="${2}"
export SUPERSET_PGP_FULLNAME="${3}"
export SUPERSET_VERSION_RC="${SUPERSET_VERSION}rc${SUPERSET_RC}"
if [[ ${1} =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)rc([0-9]+)$ ]]; then
VERSION_MAJOR="${BASH_REMATCH[1]}"
VERSION_MINOR="${BASH_REMATCH[2]}"
VERSION_PATCH="${BASH_REMATCH[3]}"
VERSION_RC="${BASH_REMATCH[4]}"
else
echo "unable to parse version string ${1}. Example of valid version string: 0.35.2rc1"
exit 1
fi
export SUPERSET_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
export SUPERSET_RC="${VERSION_RC}"
export SUPERSET_GITHUB_BRANCH="${VERSION_MAJOR}.${VERSION_MINOR}"
export SUPERSET_PGP_FULLNAME="${2}"
export SUPERSET_VERSION_RC="${SUPERSET_VERSION}rc${VERSION_RC}"
export SUPERSET_RELEASE=apache-superset-incubating-"${SUPERSET_VERSION}"
export SUPERSET_RELEASE_RC=apache-superset-incubating-"${SUPERSET_VERSION_RC}"
export SUPERSET_RELEASE_TARBALL="${SUPERSET_RELEASE}"-source.tar.gz
Expand All @@ -34,6 +45,6 @@ else

echo -------------------------------
echo Set Release env variables
env | grep SUPERSET
env | grep ^SUPERSET_
echo -------------------------------
fi

0 comments on commit 3149d8e

Please sign in to comment.