Skip to content

Commit

Permalink
chore: Update Python release process now that DataFusion is TLP (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove authored May 9, 2024
1 parent 7fd0c96 commit c6bdc9f
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 205 deletions.
59 changes: 12 additions & 47 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ We maintain a `CHANGELOG.md` so our users know what has been changed between rel
The changelog is generated using a Python script:

```bash
$ GITHUB_TOKEN=<TOKEN> ./dev/release/generate-changelog.py apache/arrow-datafusion-python 24.0.0 HEAD > dev/changelog/25.0.0.md
$ GITHUB_TOKEN=<TOKEN> ./dev/release/generate-changelog.py apache/datafusion-python 24.0.0 HEAD > dev/changelog/25.0.0.md
```

This script creates a changelog from GitHub PRs based on the labels associated with them as well as looking for
Expand All @@ -83,9 +83,9 @@ This process is not fully automated, so there are some additional manual steps:
- Add the following content (copy from the previous version's changelog and update as appropriate:

```
## [24.0.0](https://github.com/apache/arrow-datafusion-python/tree/24.0.0) (2023-05-06)
## [24.0.0](https://github.com/apache/datafusion-python/tree/24.0.0) (2023-05-06)
[Full Changelog](https://github.com/apache/arrow-datafusion-python/compare/23.0.0...24.0.0)
[Full Changelog](https://github.com/apache/datafusion-python/compare/23.0.0...24.0.0)
```

### Preparing a Release Candidate
Expand All @@ -103,42 +103,7 @@ git push apache 0.8.0-rc1
./dev/release/create-tarball.sh 0.8.0 1
```

This will also create the email template to send to the mailing list. Here is an example:

```
To: [email protected]
Subject: [VOTE][RUST][DataFusion] Release DataFusion Python Bindings 0.7.0 RC2
Hi,
I would like to propose a release of Apache Arrow DataFusion Python Bindings,
version 0.7.0.
This release candidate is based on commit: bd1b78b6d444b7ab172c6aec23fa58c842a592d7 [1]
The proposed release tarball and signatures are hosted at [2].
The changelog is located at [3].
The Python wheels are located at [4].
Please download, verify checksums and signatures, run the unit tests, and vote
on the release. The vote will be open for at least 72 hours.
Only votes from PMC members are binding, but all members of the community are
encouraged to test the release and vote with "(non-binding)".
The standard verification procedure is documented at https://github.com/apache/arrow-datafusion-python/blob/main/dev/release/README.md#verifying-release-candidates.
[ ] +1 Release this as Apache Arrow DataFusion Python 0.7.0
[ ] +0
[ ] -1 Do not release this as Apache Arrow DataFusion Python 0.7.0 because...
Here is my vote:
+1
[1]: https://github.com/apache/arrow-datafusion-python/tree/bd1b78b6d444b7ab172c6aec23fa58c842a592d7
[2]: https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-datafusion-python-0.7.0-rc2
[3]: https://github.com/apache/arrow-datafusion-python/blob/bd1b78b6d444b7ab172c6aec23fa58c842a592d7/CHANGELOG.md
[4]: https://test.pypi.org/project/datafusion/0.7.0/
```
This will also create the email template to send to the mailing list.

Create a draft email using this content, but do not send until after completing the next step.

Expand All @@ -151,7 +116,7 @@ This section assumes some familiarity with publishing Python packages to PyPi. F

Pushing an `rc` tag to the release branch will cause a GitHub Workflow to run that will build the Python wheels.

Go to https://github.com/apache/arrow-datafusion-python/actions and look for an action named "Python Release Build"
Go to https://github.com/apache/datafusion-python/actions and look for an action named "Python Release Build"
that has run against the pushed tag.

Click on the action and scroll down to the bottom of the page titled "Artifacts". Download `dist.zip`. It should
Expand Down Expand Up @@ -266,10 +231,10 @@ git push apache 0.8.0

### Add the release to Apache Reporter

Add the release to https://reporter.apache.org/addrelease.html?arrow with a version name prefixed with `RS-DATAFUSION-PYTHON`,
for example `RS-DATAFUSION-PYTHON-31.0.0`.
Add the release to https://reporter.apache.org/addrelease.html?datafusion with a version name prefixed with `DATAFUSION-PYTHON`,
for example `DATAFUSION-PYTHON-31.0.0`.

The release information is used to generate a template for a board report (see example
The release information is used to generate a template for a board report (see example from Apache Arrow
[here](https://github.com/apache/arrow/pull/14357)).

### Delete old RCs and Releases
Expand All @@ -284,13 +249,13 @@ Release candidates should be deleted once the release is published.
Get a list of DataFusion release candidates:

```bash
svn ls https://dist.apache.org/repos/dist/dev/arrow | grep datafusion-python
svn ls https://dist.apache.org/repos/dist/dev/datafusion | grep datafusion-python
```

Delete a release candidate:

```bash
svn delete -m "delete old DataFusion RC" https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-datafusion-python-7.1.0-rc1/
svn delete -m "delete old DataFusion RC" https://dist.apache.org/repos/dist/dev/datafusion/apache-datafusion-python-7.1.0-rc1/
```

#### Deleting old releases from `release` svn
Expand All @@ -300,11 +265,11 @@ Only the latest release should be available. Delete old releases after publishin
Get a list of DataFusion releases:

```bash
svn ls https://dist.apache.org/repos/dist/release/arrow | grep datafusion-python
svn ls https://dist.apache.org/repos/dist/release/datafusion | grep datafusion-python
```

Delete a release:

```bash
svn delete -m "delete old DataFusion release" https://dist.apache.org/repos/dist/release/arrow/arrow-datafusion-python-7.0.0
svn delete -m "delete old DataFusion release" https://dist.apache.org/repos/dist/release/datafusion/datafusion-python-7.0.0
```
34 changes: 17 additions & 17 deletions dev/release/create-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# Adapted from https://github.com/apache/arrow-rs/tree/master/dev/release/create-tarball.sh

# This script creates a signed tarball in
# dev/dist/apache-arrow-datafusion-python-<version>-<sha>.tar.gz and uploads it to
# dev/dist/apache-datafusion-python-<version>-<sha>.tar.gz and uploads it to
# the "dev" area of the dist.apache.arrow repository and prepares an
# email for sending to the dev@arrow.apache.org list for a formal
# email for sending to the dev@datafusion.apache.org list for a formal
# vote.
#
# See release/README.md for full release instructions
Expand Down Expand Up @@ -65,25 +65,25 @@ tag="${version}-rc${rc}"
echo "Attempting to create ${tarball} from tag ${tag}"
release_hash=$(cd "${SOURCE_TOP_DIR}" && git rev-list --max-count=1 ${tag})

release=apache-arrow-datafusion-python-${version}
release=apache-datafusion-python-${version}
distdir=${SOURCE_TOP_DIR}/dev/dist/${release}-rc${rc}
tarname=${release}.tar.gz
tarball=${distdir}/${tarname}
url="https://dist.apache.org/repos/dist/dev/arrow/${release}-rc${rc}"
url="https://dist.apache.org/repos/dist/dev/datafusion/${release}-rc${rc}"

if [ -z "$release_hash" ]; then
echo "Cannot continue: unknown git tag: ${tag}"
fi

echo "Draft email for dev@arrow.apache.org mailing list"
echo "Draft email for dev@datafusion.apache.org mailing list"
echo ""
echo "---------------------------------------------------------"
cat <<MAIL
To: dev@arrow.apache.org
Subject: [VOTE][RUST][DataFusion] Release DataFusion Python Bindings ${version} RC${rc}
To: dev@datafusion.apache.org
Subject: [VOTE] Release DataFusion Python Bindings ${version} RC${rc}
Hi,
I would like to propose a release of Apache Arrow DataFusion Python Bindings,
I would like to propose a release of the Apache DataFusion Python Bindings,
version ${version}.
This release candidate is based on commit: ${release_hash} [1]
Expand All @@ -97,19 +97,19 @@ on the release. The vote will be open for at least 72 hours.
Only votes from PMC members are binding, but all members of the community are
encouraged to test the release and vote with "(non-binding)".
The standard verification procedure is documented at https://github.com/apache/arrow-datafusion-python/blob/main/dev/release/README.md#verifying-release-candidates.
The standard verification procedure is documented at https://github.com/apache/datafusion-python/blob/main/dev/release/README.md#verifying-release-candidates.
[ ] +1 Release this as Apache Arrow DataFusion Python ${version}
[ ] +1 Release this as Apache DataFusion Python ${version}
[ ] +0
[ ] -1 Do not release this as Apache Arrow DataFusion Python ${version} because...
[ ] -1 Do not release this as Apache DataFusion Python ${version} because...
Here is my vote:
+1
[1]: https://github.com/apache/arrow-datafusion-python/tree/${release_hash}
[1]: https://github.com/apache/datafusion-python/tree/${release_hash}
[2]: ${url}
[3]: https://github.com/apache/arrow-datafusion-python/blob/${release_hash}/CHANGELOG.md
[3]: https://github.com/apache/datafusion-python/blob/${release_hash}/CHANGELOG.md
[4]: https://test.pypi.org/project/datafusion/${version}/
MAIL
echo "---------------------------------------------------------"
Expand All @@ -127,12 +127,12 @@ echo "Signing tarball and creating checksums"
gpg --armor --output ${tarball}.asc --detach-sig ${tarball}
# create signing with relative path of tarball
# so that they can be verified with a command such as
# shasum --check apache-arrow-datafusion-python-4.1.0-rc2.tar.gz.sha512
# shasum --check apache-datafusion-python-4.1.0-rc2.tar.gz.sha512
(cd ${distdir} && shasum -a 256 ${tarname}) > ${tarball}.sha256
(cd ${distdir} && shasum -a 512 ${tarname}) > ${tarball}.sha512


echo "Uploading to apache dist/dev to ${url}"
svn co --depth=empty https://dist.apache.org/repos/dist/dev/arrow ${SOURCE_TOP_DIR}/dev/dist
echo "Uploading to datafusion dist/dev to ${url}"
svn co --depth=empty https://dist.apache.org/repos/dist/dev/datafusion ${SOURCE_TOP_DIR}/dev/dist
svn add ${distdir}
svn ci -m "Apache Arrow DataFusion Python ${version} ${rc}" ${distdir}
svn ci -m "Apache DataFusion Python ${version} ${rc}" ${distdir}
2 changes: 1 addition & 1 deletion dev/release/generate-changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def cli(args=None):

parser = argparse.ArgumentParser()
parser.add_argument(
"project", help="The project name e.g. apache/arrow-datafusion-python"
"project", help="The project name e.g. apache/datafusion-python"
)
parser.add_argument("tag1", help="The previous release tag")
parser.add_argument("tag2", help="The current release tag")
Expand Down
12 changes: 6 additions & 6 deletions dev/release/release-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
version=$1
rc=$2

tmp_dir=tmp-apache-arrow-datafusion-python-dist
tmp_dir=tmp-apache-datafusion-python-dist

echo "Recreate temporary directory: ${tmp_dir}"
rm -rf ${tmp_dir}
Expand All @@ -52,23 +52,23 @@ mkdir -p ${tmp_dir}
echo "Clone dev dist repository"
svn \
co \
https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-datafusion-python-${version}-rc${rc} \
https://dist.apache.org/repos/dist/dev/datafusion/apache-datafusion-python-${version}-rc${rc} \
${tmp_dir}/dev

echo "Clone release dist repository"
svn co https://dist.apache.org/repos/dist/release/arrow ${tmp_dir}/release
svn co https://dist.apache.org/repos/dist/release/datafusion ${tmp_dir}/release

echo "Copy ${version}-rc${rc} to release working copy"
release_version=arrow-datafusion-python-${version}
release_version=datafusion-python-${version}
mkdir -p ${tmp_dir}/release/${release_version}
cp -r ${tmp_dir}/dev/* ${tmp_dir}/release/${release_version}/
svn add ${tmp_dir}/release/${release_version}

echo "Commit release"
svn ci -m "Apache Arrow DataFusion Python ${version}" ${tmp_dir}/release
svn ci -m "Apache DataFusion Python ${version}" ${tmp_dir}/release

echo "Clean up"
rm -rf ${tmp_dir}

echo "Success! The release is available here:"
echo " https://dist.apache.org/repos/dist/release/arrow/${release_version}"
echo " https://dist.apache.org/repos/dist/release/datafusion/${release_version}"
33 changes: 0 additions & 33 deletions dev/release/update_change_log-datafusion-python.sh

This file was deleted.

87 changes: 0 additions & 87 deletions dev/release/update_change_log.sh

This file was deleted.

Loading

0 comments on commit c6bdc9f

Please sign in to comment.