Skip to content

Harden release + verify scripts for SVN upload and local artifact dirs#1641

Open
skrawcz wants to merge 1 commit into
mainfrom
stefan/harden-release-scripts
Open

Harden release + verify scripts for SVN upload and local artifact dirs#1641
skrawcz wants to merge 1 commit into
mainfrom
stefan/harden-release-scripts

Conversation

@skrawcz

@skrawcz skrawcz commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

These bugs surfaced while cutting the apache-hamilton-{sdk,ui,lsp,contrib} RC1 release.

scripts/apache_release_helper.py

Absolute artifact paths. create_release_artifacts chdir's into the package working_dir to build, but svn_upload runs from the repo root. The previously-returned relative paths then failed to resolve, producing:

svn: E000002: Can't stat '/Users/.../hamilton/dist/apache-hamilton-contrib-0.0.9-incubating-src.tar.gz': No such file or directory

Now returns absolute paths so the import works regardless of CWD.

Resumable SVN upload. svn_upload unconditionally ran svn mkdir with check=True. If a prior run partially uploaded (dir created, some files imported) a re-run aborted on svn mkdir ('directory already exists'). Now a pre-existing RC directory is tolerated so the re-run resumes importing the remaining files. (This is exactly what happened with contrib RC1, which uploaded only 2 of 6 files.)

scripts/verify-sub-packages/*.sh (all 4)

The functional-verification step does cd /tmp (so the local hamilton checkout doesn't shadow venv-installed packages via '' on sys.path), but then referenced $ARTIFACTS_DIR relatively — breaking when a relative local artifacts dir was passed (e.g. verify_sdk.sh 0.9.0 1 ui/sdk/dist):

error: Distribution not found at: file:///private/tmp/ui/sdk/dist/apache_hamilton_sdk-...whl

Now ARTIFACTS_DIR is resolved to an absolute path right after acquisition.

Verification

All four verify scripts were re-run end-to-end against the live SVN RC1 artifacts after these fixes and passed (GPG, SHA512, RAT, build-from-source, functional).

These bugs surfaced while cutting the sub-package RC1 release.

apache_release_helper.py:
- create_release_artifacts: return absolute artifact paths. The function
  chdir's into the package working_dir to build, but svn_upload runs from
  the repo root, so the previously-returned relative paths failed to
  resolve (svn import 'No such file or directory').
- svn_upload: tolerate an already-existing SVN RC directory so a re-run
  after a partial/failed upload can resume importing files instead of
  aborting on 'svn mkdir'.

verify-sub-packages/*.sh:
- Resolve ARTIFACTS_DIR to an absolute path right after acquisition. The
  functional step does 'cd /tmp' (to avoid the local checkout shadowing
  venv packages), which broke a relative local artifacts dir.
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.

1 participant