Skip to content

Comments

Add cleanup step of SVN dist release repo#3475

Merged
pingtimeout merged 1 commit intoapache:mainfrom
pingtimeout:release-workflows-cleanup-dist-release
Feb 18, 2026
Merged

Add cleanup step of SVN dist release repo#3475
pingtimeout merged 1 commit intoapache:mainfrom
pingtimeout:release-workflows-cleanup-dist-release

Conversation

@pingtimeout
Copy link
Contributor

Follow-up of #3474.

This PR adds some cleanup step in the fourth release automation workflow (publish artifacts after a vote succeeds). The cleanup step delete previously released artifacts (binaries and helm charts) after the artifacts from the current release have been published. This cleanup happens before the helm repo index . step so that deleted helm charts are not indexed anymore.

I tested this by removing previous released versions (before 1.3.0-incubating) from the Apache dist release SVN repository. I did this operation manually from my machine, but reused the bash commands that would have been executed by the workflow. See below for the console output.

Question for reviewers.
This logic removes all previous versions, given that we do not currently cut minor releases for any major version. This fact is strictly required for any sort of automated cleanup. Otherwise we would need to maintain some memory of the currently supported releases, so that the logic does not delete artifacts from a previous-but-supported release.

Is this PR good-enough for now or should we abandon it and instead keep this as a manual step?


bash-5.2$             for old_helm_version in ${old_helm_versions}; do               exec_process svn rm --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive                 "${release_helm_url}/${old_helm_version}"                 -m "Remove old Helm chart ${old_helm_version} (superseded by ${version_without_rc})";             done
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/helm-chart/1.0.0-incubating -m Remove old Helm chart 1.0.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81990 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/helm-chart/1.0.1-incubating -m Remove old Helm chart 1.0.1-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81991 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/helm-chart/1.1.0-incubating -m Remove old Helm chart 1.1.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81992 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/helm-chart/1.2.0-incubating -m Remove old Helm chart 1.2.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81993 propagée.


bash-5.2$             for old_version in ${old_versions}; do               exec_process svn rm --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive                 "${release_artifacts_url}/${old_version}"                 -m "Remove old release ${old_version} (superseded by ${version_without_rc})";             done
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/0.9.0-incubating -m Remove old release 0.9.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81994 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/1.0.0-incubating -m Remove old release 1.0.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81995 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/1.0.1-incubating -m Remove old release 1.0.1-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81996 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/1.1.0-incubating -m Remove old release 1.1.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81997 propagée.
DEBUG: Executing 'svn rm --username ... --password ... --non-interactive https://dist.apache.org/repos/dist/release/incubator/polaris/1.2.0-incubating -m Remove old release 1.2.0-incubating (superseded by 1.3.0-incubating)'
Transaction de propagation...
Révision 81998 propagée.

bash-5.2$           exec_process svn commit --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive -m "Update Helm index for ${version_without_rc} release"
DEBUG: Executing 'svn commit --username ... --password ... --non-interactive -m Update Helm index for 1.3.0-incubating release'

Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM. The CI failure looks unrelated.

IMO we should automate as much as possible.

snazy
snazy previously approved these changes Jan 23, 2026
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jan 23, 2026
@snazy
Copy link
Member

snazy commented Feb 2, 2026

@pingtimeout I think the PR can be merged?

@pingtimeout pingtimeout force-pushed the release-workflows-cleanup-dist-release branch 2 times, most recently from 4344cd5 to cd555c6 Compare February 16, 2026 16:07
@pingtimeout
Copy link
Contributor Author

@snazy I rebased on main as some other workflow changes created conflicts, can you re-approve once you have some spare cycles please?

@pingtimeout pingtimeout merged commit c204db9 into apache:main Feb 18, 2026
23 of 30 checks passed
@pingtimeout pingtimeout deleted the release-workflows-cleanup-dist-release branch February 18, 2026 17:24
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants