DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Building an RC
The Release Candidate artifacts we vote upon should be the exact ones we vote against, without any modification than renaming – i.e. the contents of the files must be the same between voted release canidate and final release. Because of this the version in the built artifacts that will become the official Apache releases must not include the rcN suffix.
Set environment variables
# Set Version export VERSION=1.10.2rc3 # Set AIRFLOW_REPO_ROOT to the path of your git repo export AIRFLOW_REPO_ROOT=$(pwd) # Example after cloning git clone https://github.com/apache/airflow.git airflow cd airflow export AIRFLOW_REPO_ROOT=$(pwd)
- set your version to 1.10.2 in
airflow/version.py(without the RC tag) - Commit the version change.
Tag your release
git tag ${VERSION}Clean the checkout: the sdist step below will
git clean -fxd
Tarball the repo
git archive --format=tar.gz ${VERSION} --prefix=apache-airflow-${VERSION}/ -o apache-airflow-${VERSION}-source.tar.gzGenerate sdist
NOTE: Make sure your checkout is clean at this stage - any untracked or changed files will otherwise be included in the file produced.python setup.py compile_assets sdist bdist_wheel
Rename the sdist
mv dist/apache-airflow-${VERSION%rc?}.tar.gz apache-airflow-${VERSION}-bin.tar.gz mv dist/apache_airflow-${VERSION%rc?}-py2.py3-none-any.whl apache_airflow-${VERSION}-py2.py3-none-any.whlGenerate SHA512/ASC (If you have not generated a key yet, generate it by following instructions on http://www.apache.org/dev/openpgp.html#key-gen-generate-key)
${AIRFLOW_REPO_ROOT}/dev/sign.sh apache-airflow-${VERSION}-source.tar.gz ${AIRFLOW_REPO_ROOT}/dev/sign.sh apache-airflow-${VERSION}-bin.tar.gz ${AIRFLOW_REPO_ROOT}/dev/sign.sh apache_airflow-${VERSION}-py2.py3-none-any.whlPush Tags
git push --tags
Push the artifacts to ASF dev dist repo
# First clone the repo svn checkout https://dist.apache.org/repos/dist/dev/airflow airflow-dev # Create new folder for the release cd airflow-dev svn mkdir ${VERSION} # Move the artifacts to svn folder & commit mv ${AIRFLOW_REPO_ROOT}/apache{-,_}airflow-${VERSION}* ${VERSION}/ cd ${VERSION} svn add * svn commit -m "Add artifacts for Airflow ${VERSION}"
PyPI Snapshots (Optional)
At this point we have the artefact that we vote on, but as a convenience to developers we also want to publish "snapshots" of the RC builds to pypi for installing via pip. To do this we need to
- Edit the
airflow/version.pyto include the RC suffix. python setup.py compile_assets sdist bdist_wheel- Follow the steps in Releasing Airflow [ARCHIVED]#Publishing to PyPi
- Throw away the change - we don't want to commit this:
git checkout airflow/version.py
It is important to stress that this snapshot is not intended for users.
Make sure your public key is on id.apache.org and in KEYS
You will need to sign the release artifacts with your pgp key. After you have created a key, make sure you
- Add your GPG pub key to https://dist.apache.org/repos/dist/release/airflow/KEYS , follow the instructions at the top of that file. Upload your GPG public key to https://pgp.mit.edu
- Add your key fingerprint to https://id.apache.org/ (login with your apache credentials, paste your fingerprint into the pgp fingerprint field and hit save).
# Create PGP Key gpg --gen-key # Checkout ASF dist repo svn checkout https://dist.apache.org/repos/dist/release/airflow cd airflow # Add your GPG pub key to KEYS file. Replace "Kaxil Naik" with your name (gpg --list-sigs "Kaxil Naik" && gpg --armor --export "Kaxil Naik" ) >> KEYS # Commit the changes svn commit -m "Add PGP keys of Airflow developers"
See this for more detail on creating keys and what is required for signing releases.
http://www.apache.org/dev/release-signing.html#basic-facts
Voting on an RC
Once the RC is built (both source and binary), put them in the dev SVN repository:
https://dist.apache.org/repos/dist/dev/airflow/Use the dev/airflow-jira script to generate a list of Airflow JIRAs that were closed in the release.
Send out a vote to the dev@airflow.apache.org mailing list:
Once the vote has been passed, you will need to send a result vote to dev@airflow.apache.org:
Publishing release
After both votes pass (see above), you need to migrate the RC artifacts that passed to this repository:
https://dist.apache.org/repos/dist/release/airflow/
(The migration should including renaming the files so that they no longer have the RC number in their filenames.)
The best way of doing this is tosvn cpbetween the two repos (this avoids having to upload the binaries again, and gives a clearer history in the svn commit logs):# First clone the repo export RC=1.10.4rc5 export VERSION=${RC/rc?/} svn checkout https://dist.apache.org/repos/dist/release/airflow airflow-release # Create new folder for the release cd airflow-release svn mkdir ${VERSION} cd ${VERSION} # Move the artifacts to svn folder & commit for f in ../../airflow-dev/$RC/*; do svn cp $f ${$(basename $f)/rc?/}; done svn commit -m "Release Airflow ${VERSION} from ${RC}" # Remove old release # http://www.apache.org/legal/release-policy.html#when-to-archive cd .. export PREVIOUS_VERSION=1.10.1 svn rm ${PREVIOUS_VERSION} svn commit -m "Remove old release: ${PREVIOUS_VERSION}"
Publishing to PyPi
Create a ~/.pypirc file:
$ cat ~/.pypirc [distutils] index-servers = pypi pypitest [pypi] username=your-username password=********* [pypitest] repository=https://test.pypi.org/legacy/ username=your-username password=*********
(more details here.)
Set proper permissions for the pypirc file:
$ chmod 600 ~/.pypirc
- Confirm that airflow/version.py is set properly.
Install twine if you do not have it already.
pip install twine
Build the package:
python setup.py compile_assets sdist bdist_wheel
Verify the artifacts that would be uploaded:
twine check dist/*
Upload the package to PyPi's test environment:
twine upload -r pypitest dist/*
- Verify that the test package looks good by downloading it and installing it into a virtual environment. The package download link is available at:
https://test.pypi.org/project/apache-airflow/#files Upload the package to PyPi's production environment:
twine upload -r pypi dist/*
Again, confirm that the package is available here:
https://pypi.python.org/pypi/apache-airflow
Updating CHANGELOG.md
Get a diff between the last version and the current version:
$ git log 1.8.0..1.9.0 --pretty=oneline
- Update CHANGELOG.md with the details, and commit it.
Notifying developers of release
Notify users@airflow.apache.org (cc'ing dev@airflow.apache.org and announce@apache.org) that the artifacts have been published:
Update the Announce page on the wiki
Publishing documentation
- Follow instructions on Building and deploying the docs [ARCHIVED]
6 Comments
Bolke de Bruin
May 18, 2017Signing can be simper by using "sign.sh" in the dev directory.
Siddharth Anand
Sep 02, 2018We need to update this with https://github.com/apache/incubator-airflow/blob/master/CONTRIBUTING.md#setting-up-the-node--npm-javascript-environment-only-for-www_rbac
Kaxil Naik
Jan 17, 2019Added
Jarek Potiuk
Oct 28, 2019Should we automate all of that soon ? I know my second name is automation. But I am all for having it all done by pushing a button. That might be a prerequisite to make regular releases with a predefined schedule.
Kaxil Naik
Oct 28, 2019Agree, however, we need to be very careful as it can break the production systems if incorrect/broken artifacts are uploaded to PyPI !!
Ash Berlin-Taylor
Oct 28, 2019Yes. Most of it is a step or two away from automated anyway as I gradually update the snippets above to be "smart" about the version numbers etc.