You can find the prerequisites to release Apache Airflow Python Client in README.md.
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 candidate 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=2.0.0rc1 # Example after cloning git clone https://github.com/apache/airflow-client-python.git airflow-client cd airflow-client export CLIENT_REPO_ROOT=$(pwd)
Set your version to 2.0.0 in setup.py
(without the RC tag)
Commit the version change.
Tag your release
git tag -s ${VERSION}
Clean the checkout: the sdist step below will
git clean -fxd
Tarball the repo
git archive --format=tar.gz ${VERSION} --prefix=airflow-client-${VERSION}/ -o airflow-client-${VERSION}-source.tar.gz
Generate 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 sdist bdist_wheel
Rename the sdist
mv dist/airflow-client-${VERSION%rc?}.tar.gz airflow-client-${VERSION}-bin.tar.gz mv dist/airflow_client-${VERSION%rc?}-py3-none-any.whl airflow_client-${VERSION}-py3-none-any.whl
Generate 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)
${CLIENT_REPO_ROOT}/dev/sign.sh airflow-client-${VERSION}-source.tar.gz ${CLIENT_REPO_ROOT}/dev/sign.sh airflow-client-${VERSION}-bin.tar.gz ${CLIENT_REPO_ROOT}/dev/sign.sh airflow_client-${VERSION}-py3-none-any.whl
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/clients/python svn mkdir ${VERSION} # Move the artifacts to svn folder & commit mv ${CLIENT_REPO_ROOT}/airflow{-,_}client-${VERSION}* ${VERSION}/ cd ${VERSION} svn add * svn commit -m "Add artifacts for Airflow Python Client ${VERSION}"
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
Build the package:
cd ${CLIENT_REPO_ROOT} python setup.py egg_info --tag-build "$(sed -e "s/^[0-9.]*//" <<<"$VERSION")" sdist bdist_wheel
Verify the artifacts that would be uploaded:
twine check dist/*
Upload the package to PyPi's test environment:
twine upload --repository-url=https://test.pypi.org/legacy/ 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/airflow-client/#files
Or via pypi pip install -i https://test.pypi.org/simple/ airflow-client==$(VERSION)
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/airflow-client
It is important to stress that this snapshot should not be named “release”, and it is not supposed to be used by and advertised to the end-users who do not read the devlist.
Push Tag for the release candidate
git push origin ${VERSION}
See Airflow process documented here (just replace Airflow with Airflow Client).
See Airflow process documented here.
See Airflow process documented here (just replace Airflow with Airflow Client).
See Airflow process documented here.
See Airflow process documented here.
This can be done (and we encourage to) by any of the Contributors. In fact, it's best if the actual users of Airflow Client test it in their own staging/test installations. Each release candidate is available on PyPI apart from SVN packages, so everyone should be able to install the release candidate version of Airflow Client via simply ( is 2.0.0 for example, and is release candidate number 1,2,3,....).
pip install airflow-client==<VERSION>rc<X>
Once you install and run Airflow Client, you should perform any verification you see as necessary to check that the client works as you expected.
See Airflow process documented here (just replace Airflow with Airflow Client).
# First clone the repo export RC=2.0.0rc1 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/clients/python svn mkdir ${VERSION} cd ${VERSION} # Move the artifacts to svn folder & commit for f in ../../../airflow-dev/clients/python/$RC/*; do svn cp $f ${$(basename $f)/rc?/}; done svn commit -m "Release Airflow Client ${VERSION} from ${RC}" # Remove old release # http://www.apache.org/legal/release-policy.html#when-to-archive cd .. export PREVIOUS_VERSION=1.0.0 svn rm ${PREVIOUS_VERSION} svn commit -m "Remove old release: ${PREVIOUS_VERSION}"
Verify that the packages appear in airflow
At this point we release an official package:
Build the package:
python setup.py sdist bdist_wheel
Verify the artifacts that would be uploaded:
twine check dist/*
Upload the package to PyPi's test environment:
twine upload --repository-url=https://test.pypi.org/legacy/ 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/airflow-client/#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/airflow-client
Get a diff between the last version and the current version:
git log 1.0.0..2.0.0 --pretty=oneline
Update CHANGELOG.md with the details, and commit it.
Push Tag for the final version
git push origin ${VERSION}
See Airflow process documented here (just replace Airflow with Airflow Client)