You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by ad...@apache.org on 2026/04/02 04:42:13 UTC

(polaris) branch release/1.4.x updated: Clean SVN directories before adding artifacts (#4094)

This is an automated email from the ASF dual-hosted git repository.

adnan pushed a commit to branch release/1.4.x
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/release/1.4.x by this push:
     new 5812523174 Clean SVN directories before adding artifacts (#4094)
5812523174 is described below

commit 58125231748550044703558b16e7f53439ef0b8f
Author: Adnan Hemani <ad...@berkeley.edu>
AuthorDate: Wed Apr 1 21:42:08 2026 -0700

    Clean SVN directories before adding artifacts (#4094)
---
 .../release-3-build-and-publish-artifacts.yml         | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-3-build-and-publish-artifacts.yml b/.github/workflows/release-3-build-and-publish-artifacts.yml
index 4fd3985ca4..875d93226e 100644
--- a/.github/workflows/release-3-build-and-publish-artifacts.yml
+++ b/.github/workflows/release-3-build-and-publish-artifacts.yml
@@ -185,6 +185,13 @@ jobs:
           exec_process_with_retries 5 60 "${dist_dev_dir}" svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive "${APACHE_DIST_URL}${APACHE_DIST_PATH}" "${dist_dev_dir}"
 
           version_dir="${dist_dev_dir}/${version_without_rc}"
+
+          # If the version directory already exists in SVN (e.g. re-running the workflow),
+          # delete it so we can re-add fresh artifacts without "already versioned" errors.
+          if svn info "${version_dir}" &>/dev/null 2>&1; then
+            exec_process svn delete "${version_dir}"
+          fi
+
           exec_process mkdir -p "${version_dir}"
           exec_process cp build/distributions/* "${version_dir}/"
           exec_process cp runtime/distribution/build/distributions/* "${version_dir}/"
@@ -392,8 +399,16 @@ jobs:
           # Retry logic for SVN checkout (Apache SVN can have transient connectivity issues)
           exec_process_with_retries 5 60 "${dist_dev_dir}" svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive "${APACHE_DIST_URL}${APACHE_DIST_PATH}" "${dist_dev_dir}"
 
-          exec_process mkdir -p "${dist_dev_dir}/helm-chart/${version_without_rc}"
-          exec_process cp helm/polaris-${version_without_rc}.tgz* "${dist_dev_dir}/helm-chart/${version_without_rc}/"
+          helm_version_dir="${dist_dev_dir}/helm-chart/${version_without_rc}"
+
+          # If the helm version directory already exists in SVN (e.g. re-running the workflow),
+          # delete it so we can re-add fresh artifacts without "already versioned" errors.
+          if svn info "${helm_version_dir}" &>/dev/null 2>&1; then
+            exec_process svn delete "${helm_version_dir}"
+          fi
+
+          exec_process mkdir -p "${helm_version_dir}"
+          exec_process cp helm/polaris-${version_without_rc}.tgz* "${helm_version_dir}/"
 
           exec_process cd "${dist_dev_dir}"
           exec_process svn add --parents "helm-chart/${version_without_rc}"