You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/10/03 17:06:10 UTC
(datafusion-comet) 02/02: fix: validate release build ref before building (#6571)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
commit f980d6fb59f51ae20c0a6916eec9771ace8e50d1
Author: Andy Grove <ag...@apache.org>
AuthorDate: Sat Oct 3 16:40:18 2026 +0000
fix: validate release build ref before building (#6571)
---
dev/release/build-release-comet.sh | 27 ++++++++++++--
docs/source/contributor-guide/release_process.md | 45 +++++++++++++-----------
2 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/dev/release/build-release-comet.sh b/dev/release/build-release-comet.sh
index 495b2ece0a..4b061a4075 100755
--- a/dev/release/build-release-comet.sh
+++ b/dev/release/build-release-comet.sh
@@ -34,7 +34,7 @@ This script builds comet native binaries inside a docker image. The image is nam
Options are:
-r [repo] : git repo (default: ${REPO})
- -b [branch] : git branch (default: ${BRANCH})
+ -b [ref] : git branch or tag to build (required)
-t [tag] : tag for the spark-rm docker image to use for building (default: "latest").
EOF
exit 1
@@ -59,10 +59,10 @@ function cleanup()
trap cleanup SIGINT SIGTERM EXIT
-CLEANUP=1
+CLEANUP=0
REPO="https://github.com/apache/datafusion-comet.git"
-BRANCH="release"
+BRANCH=
MACOS_SDK=
HAS_MACOS_SDK="false"
IMGTAG=latest
@@ -77,6 +77,26 @@ while getopts "b:hr:t:" opt; do
esac
done
+if [ -z "$BRANCH" ]
+then
+ echo "Error: -b must specify the branch or tag to build"
+ usage
+fi
+
+if git ls-remote --exit-code "$REPO" "refs/heads/$BRANCH" "refs/tags/$BRANCH" >/dev/null
+then
+ echo "Found branch or tag $BRANCH in $REPO"
+else
+ STATUS=$?
+ if [ "$STATUS" -eq 2 ]
+ then
+ echo "Error: branch or tag '$BRANCH' does not exist in $REPO"
+ else
+ echo "Error: unable to check branch or tag '$BRANCH' in $REPO"
+ fi
+ exit 1
+fi
+
echo "Building binaries from $REPO/$BRANCH"
# Check Java version
@@ -135,6 +155,7 @@ pushd $COMET_HOME_DIR/native && cargo clean && popd
# Run the builder container for each architecture. The entrypoint script will build the binaries
# AMD64
+CLEANUP=1
echo "Building amd64 binary"
docker run \
--name comet-amd64-builder-container \
diff --git a/docs/source/contributor-guide/release_process.md b/docs/source/contributor-guide/release_process.md
index 9b0571bc75..cd3ee4b6d8 100644
--- a/docs/source/contributor-guide/release_process.md
+++ b/docs/source/contributor-guide/release_process.md
@@ -63,8 +63,8 @@ instructions on each step.
- [ ] Check for fixes missing from the release branches
- [ ] Generate the change log and PR it against the release branch
- [ ] Run the full CI suite on the release branch
- - [ ] Build the jars
- [ ] Tag the release candidate
+ - [ ] Build the jars from the release candidate tag
- [ ] Update documentation for the new release
- [ ] Publish Maven artifacts to staging
- [ ] Create the release candidate tarball
@@ -327,6 +327,21 @@ done
Both runs must be green at the commit you are about to tag. If anything merges to the release branch after the
runs start, run them again. Repeat this for every release candidate.
+### Tag the Release Candidate
+
+Ensure that the Maven version update and change log have been merged to the release branch, and that the
+[full CI run](#run-the-full-ci-suite) is green at the commit you are tagging, before tagging.
+
+Tag the release branch with `0.13.0-rc1` and push to the `apache` repo:
+
+```shell
+git fetch apache
+git checkout branch-0.13
+git reset --hard apache/branch-0.13
+git tag 0.13.0-rc1
+git push apache 0.13.0-rc1
+```
+
### Build the jars
#### A note on workspace cleanliness
@@ -363,8 +378,10 @@ $ docker context use desktop-linux
The `build-release-comet.sh` script will create a docker image for each architecture and use the image
to build the platform specific binaries. These builder images are created every time this script is run.
-The script optionally allows overriding of the repository and branch to build the binaries from (Note that
-the local git repo is not used in the building of the binaries, but it is used to build the final uber jar).
+The branch or tag to build is required, and the script optionally allows overriding the repository. For a release,
+always build from the release candidate tag created in the previous step. The remote tag is used to build the native
+binaries, while the local checkout is used to build the final uber jar, so check out the same tag locally before
+running the script.
```shell
Usage: build-release-comet.sh [options]
@@ -375,36 +392,22 @@ This script builds comet native binaries inside a docker image. The image is nam
Options are:
-r [repo] : git repo (default: https://github.com/apache/datafusion-comet.git)
--b [branch] : git branch (default: release)
+-b [ref] : git branch or tag to build (required)
-t [tag] : tag for the spark-rm docker image to use for building (default: "latest").
```
Example:
```shell
-cd dev/release && ./build-release-comet.sh && cd ../..
+git checkout 0.13.0-rc1
+cd dev/release && ./build-release-comet.sh -b 0.13.0-rc1 && cd ../..
```
#### Build output
The build output is installed to a temporary local maven repository. The build script will print the name of the
repository location at the end. This location will be required at the time of deploying the artifacts to a staging
-repository
-
-### Tag the Release Candidate
-
-Ensure that the Maven version update and change log have been merged to the release branch, and that the
-[full CI run](#run-the-full-ci-suite) is green at the commit you are tagging, before tagging.
-
-Tag the release branch with `0.13.0-rc1` and push to the `apache` repo
-
-```shell
-git fetch apache
-git checkout branch-0.13
-git reset --hard apache/branch-0.13
-git tag 0.13.0-rc1
-git push apache 0.13.0-rc1
-```
+repository.
### Publishing Documentation
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org