Skip to content

Commit 3da6f7b

Browse files
committed
chore(release): tighten release scripts after review
Address review feedback on the multi-platform JAR pipeline: - build-release.sh: pre-clean leftover builder containers before the first `docker run`. Without this, a prior SIGKILL'd run leaves named containers behind and the next invocation fails immediately on `docker run --name` with a name conflict. - publish-to-maven.sh: pass `--fail-with-body` to the upload-loop and close-staging curl calls. curl exits 0 on HTTP 4xx/5xx by default, which would silently let an unauthorised or rejected upload run to completion and corrupt the staging repo. - Dockerfile: fold gcc-10 / g++-10 / cpp-10 into the main `apt-get install --no-install-recommends -y` layer so the apt cache stays consistent and the layer count is reduced. - README: document `xmllint` as a release-manager prerequisite (used by publish-to-maven.sh to parse Nexus staging responses).
1 parent aa44d10 commit 3da6f7b

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

‎dev/release/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ for the common platforms. This section covers building that JAR.
172172
- Java 17+
173173
- Rust toolchain via rustup
174174
- `gpg` configured with a key listed in the ASF KEYS file
175+
- `xmllint` on `PATH` (pre-installed on macOS; `libxml2-utils` on Debian/Ubuntu)
175176

176177
### Build the multi-platform JAR
177178

‎dev/release/build-release.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ cleanup() {
102102
}
103103
trap cleanup SIGINT SIGTERM EXIT
104104

105+
echo "Cleaning leftover builder containers from any prior interrupted run"
106+
docker rm -f "$CONTAINER_AMD64" "$CONTAINER_ARM64" >/dev/null 2>&1 || true
107+
105108
echo "Cleaning previous Java and native build output"
106109
(cd "$PROJECT_HOME" && ./mvnw -q clean)
107110
(cd "$PROJECT_HOME/native" && cargo clean)

‎dev/release/datafusion-java-rm/Dockerfile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ RUN export LC_ALL=C \
4141
libbz2-dev \
4242
zlib1g-dev \
4343
default-jdk \
44-
unzip
45-
46-
RUN apt install -y gcc-10 g++-10 cpp-10
44+
unzip \
45+
gcc-10 \
46+
g++-10 \
47+
cpp-10
4748
ENV CC="gcc-10"
4849
ENV CXX="g++-10"
4950

‎dev/release/publish-to-maven.sh‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,15 @@ for file in $(find . -type f); do
125125
FILE_SHORT=$(echo "$file" | sed -e "s/\.\///")
126126
DEST_URL="$NEXUS_UPLOAD/org/apache/datafusion/$FILE_SHORT"
127127
echo " Uploading $FILE_SHORT"
128-
curl -u "$ASF_USERNAME:$ASF_PASSWORD" --upload-file "$FILE_SHORT" "$DEST_URL"
128+
curl --fail-with-body \
129+
-u "$ASF_USERNAME:$ASF_PASSWORD" \
130+
--upload-file "$FILE_SHORT" "$DEST_URL"
129131
done
130132

131133
echo "Closing nexus staging repository"
132134
REPO_REQUEST="<promoteRequest><data><stagedRepositoryId>$STAGED_REPO_ID</stagedRepositoryId><description>Apache DataFusion Java (commit $GIT_HASH)</description></data></promoteRequest>"
133-
curl -X POST -d "$REPO_REQUEST" -u "$ASF_USERNAME:$ASF_PASSWORD" \
134-
-H "Content-Type:application/xml" -v \
135+
curl --fail-with-body -X POST -d "$REPO_REQUEST" -u "$ASF_USERNAME:$ASF_PASSWORD" \
136+
-H "Content-Type:application/xml" \
135137
"$NEXUS_ROOT/profiles/$NEXUS_PROFILE/finish"
136138
echo "Closed Nexus staging repository: $STAGED_REPO_ID"
137139

0 commit comments

Comments
 (0)