From ec8fbf439e32ec53182021538f64bcb5dc14202c Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 26 Feb 2026 10:01:00 -0800 Subject: [PATCH 1/2] add more checks to ensure vars are set --- mkdocs/docs/how-to-release.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mkdocs/docs/how-to-release.md b/mkdocs/docs/how-to-release.md index 35ec2ef0f6..d010f1f731 100644 --- a/mkdocs/docs/how-to-release.md +++ b/mkdocs/docs/how-to-release.md @@ -134,7 +134,11 @@ This action will generate two final artifacts: If `gh` is available, watch the GitHub Action progress using: ```bash +: "${GIT_TAG:?ERROR: GIT_TAG is not set or is empty}" + RUN_ID=$(gh run list --repo apache/iceberg-python --workflow "Python Build Release Candidate" --branch "${GIT_TAG}" --event push --json databaseId -q '.[0].databaseId') +: "${RUN_ID:?ERROR: RUN_ID could not be determined}" + echo "Waiting for workflow to complete, this will take several minutes..." gh run watch $RUN_ID --repo apache/iceberg-python ``` @@ -142,6 +146,8 @@ gh run watch $RUN_ID --repo apache/iceberg-python and download the artifacts using: ```bash +: "${RUN_ID:?ERROR: RUN_ID is not set or is empty}" + gh run download $RUN_ID --repo apache/iceberg-python ``` @@ -159,6 +165,9 @@ Navigate to the artifact directory. Generate signature and checksum files: * `.sha512` files: SHA-512 checksums for verifying file integrity. ```bash +: "${VERSION:?ERROR: VERSION is not set or is empty}" +: "${RC:?ERROR: RC is not set or is empty}" + ( cd svn-release-candidate-${VERSION}rc${RC} @@ -177,6 +186,10 @@ The parentheses `()` create a subshell. Any changes to the directory (`cd`) are Now, upload the files from the same directory: ```bash +: "${VERSION:?ERROR: VERSION is not set or is empty}" +: "${VERSION_WITH_RC:?ERROR: VERSION_WITH_RC is not set or is empty}" +: "${RC:?ERROR: RC is not set or is empty}" + export SVN_TMP_DIR=/tmp/iceberg-${VERSION}/ svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR @@ -215,6 +228,9 @@ Update the artifact directory to PyPi using `twine`. This **won't** bump the ver ```bash +: "${VERSION:?ERROR: VERSION is not set or is empty}" +: "${RC:?ERROR: RC is not set or is empty}" + twine upload pypi-release-candidate-${VERSION}rc${RC}/* ``` @@ -227,6 +243,10 @@ Verify the artifact is uploaded to [PyPi](https://pypi.org/project/pyiceberg/#hi Final step is to generate the email to the dev mail list: ```bash +: "${GIT_TAG:?ERROR: GIT_TAG is not set or is empty}" +: "${VERSION:?ERROR: VERSION is not set or is empty}" +: "${VERSION_WITH_RC:?ERROR: VERSION_WITH_RC is not set or is empty}" + export GIT_TAG_REF=$(git show-ref ${GIT_TAG}) export GIT_TAG_HASH=${GIT_TAG_REF:0:40} export LAST_COMMIT_ID=$(git rev-list ${GIT_TAG} 2> /dev/null | head -n 1) @@ -340,6 +360,8 @@ The latest version can be pushed to PyPi. Check out the Apache SVN and make sure ```bash +: "${VERSION:?ERROR: VERSION is not set or is empty}" + svn checkout https://dist.apache.org/repos/dist/release/iceberg/pyiceberg-${VERSION} /tmp/iceberg-dist-release/pyiceberg-${VERSION} cd /tmp/iceberg-dist-release/pyiceberg-${VERSION} From 3ffc2585eddfd369ef4f7fe599ec0fc4c1c70676 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 26 Feb 2026 10:06:21 -0800 Subject: [PATCH 2/2] direct import without downloading --- mkdocs/docs/how-to-release.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mkdocs/docs/how-to-release.md b/mkdocs/docs/how-to-release.md index d010f1f731..841acf4f11 100644 --- a/mkdocs/docs/how-to-release.md +++ b/mkdocs/docs/how-to-release.md @@ -190,14 +190,7 @@ Now, upload the files from the same directory: : "${VERSION_WITH_RC:?ERROR: VERSION_WITH_RC is not set or is empty}" : "${RC:?ERROR: RC is not set or is empty}" -export SVN_TMP_DIR=/tmp/iceberg-${VERSION}/ -svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR - -export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION_WITH_RC/ -mkdir -p $SVN_TMP_DIR_VERSIONED -cp svn-release-candidate-${VERSION}rc${RC}/* $SVN_TMP_DIR_VERSIONED -svn add $SVN_TMP_DIR_VERSIONED -svn ci -m "PyIceberg ${VERSION_WITH_RC}" ${SVN_TMP_DIR_VERSIONED} +svn import "svn-release-candidate-${VERSION}rc${RC}" "https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-${VERSION_WITH_RC}" -m "PyIceberg ${VERSION_WITH_RC}" ``` Verify the artifact is uploaded to [https://dist.apache.org/repos/dist/dev/iceberg](https://dist.apache.org/repos/dist/dev/iceberg/).