Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#13637] Make release re-runs safe after a partial failure (#13638)

Bharath Krishnadcdf5503e359
diff --git a/dev/release/publish-docker.sh b/dev/release/publish-docker.sh
index 48250f2eca..75b7c06e2d 100755
--- a/dev/release/publish-docker.sh
+++ b/dev/release/publish-docker.sh
@@ -171,7 +171,9 @@ echo "Verified: $INPUT_TAG exists"
DOCKER_STATE_DIR="${RELEASE_STATE_DIR:-$SELF/.release-state}/${INPUT_TAG}"
DOCKER_STATE_FILE="${DOCKER_STATE_DIR}/${STATE_KEY}.done"
-if [[ "$DRY_RUN" == "false" ]] && [[ -f "$DOCKER_STATE_FILE" ]]; then
+# A dry-run marker records the preview, so it must not stand in for a real run.
+if [[ "$DRY_RUN" == "false" ]] && [[ -f "$DOCKER_STATE_FILE" ]] &&
+ ! grep -q '^dry_run=true$' "$DOCKER_STATE_FILE"; then
echo ""
echo "=== Stage '${STATE_KEY}' is already complete ==="
cat "$DOCKER_STATE_FILE"
diff --git a/dev/release/release-build.sh b/dev/release/release-build.sh
index 429ee2212e..14565b64ff 100755
--- a/dev/release/release-build.sh
+++ b/dev/release/release-build.sh
@@ -136,6 +136,7 @@ if [[ "$1" == "finalize" ]]; then
echo "Uploading Gravitino to PyPi"
twine upload -u __token__ -p $PYPI_API_TOKEN \
--repository-url https://upload.pypi.org/legacy/ \
+ --skip-existing \
"apache_gravitino-$PYGRAVITINO_VERSION.tar.gz"
echo "Python Gravitino package uploaded"
rm -fr gravitino
@@ -274,6 +275,7 @@ if [[ "$1" == "package" ]]; then
echo "Uploading Gravitino Python package $RC_PYGRAVITINO_VERSION to PyPi"
twine upload -u __token__ -p $PYPI_API_TOKEN \
--repository-url https://upload.pypi.org/legacy/ \
+ --skip-existing \
"apache_gravitino-$RC_PYGRAVITINO_VERSION.tar.gz"
svn co --depth=empty $RELEASE_STAGING_LOCATION svn-gravitino