Skip to content

Update/robustify the release scripts for subpackages (apache-hamilton-*)#1613

Open
Dev-iL wants to merge 13 commits into
apache:mainfrom
SummitSG-LLC:2605/packaging
Open

Update/robustify the release scripts for subpackages (apache-hamilton-*)#1613
Dev-iL wants to merge 13 commits into
apache:mainfrom
SummitSG-LLC:2605/packaging

Conversation

@Dev-iL
Copy link
Copy Markdown
Collaborator

@Dev-iL Dev-iL commented May 28, 2026

This PR contains QoL improvements and fixes to various issues encountered while verifying the apache-hamilton-{sdk,ui,lsp,contrib} packages in the context of https://lists.apache.org/thread/d4fzmqq4jbsx5m3krdp1qbr0wh9j131s and related threads.

Includes #1612

Changes

UI Package (apache-hamilton-ui)

  • Added README.md for the ui/backend package, fixing long_description/long_description_content_type warnings during flit build
  • Frontend build step: the release script now runs npm run build and copies compiled frontend assets into hamilton_ui/build/ before building the wheel, ensuring the UI package includes its frontend (from Add frontend build step to UI release process #1612)
  • npm audit fix: resolved one moderate severity vulnerability in frontend dependencies

Release Helper (scripts/apache_release_helper.py)

  • --no-sign / -ns: skips GPG signing; implicitly also skips upload since unsigned artifacts must never be published
  • --no-upload / -nu: skips git tagging and SVN upload while still signing; useful for rehearsing the full signing step without publishing
  • apache_id is no longer required when --no-upload (or --no-sign) is set
  • uv script dependencies declared in the PEP 723 inline metadata block so the script can be run with uv run

Verification Scripts (scripts/verify-sub-packages/)

  • cd /tmp before functional checks in all four verify scripts (verify_contrib.sh, verify_sdk.sh, verify_lsp.sh, verify_ui.sh): prevents Python's implicit '' (cwd) sys.path entry from resolving the local checkout instead of the venv-installed packages when the script is run from the repo root
  • More informative error in verify_ui.sh: improved diagnostics when the UI health-check endpoint is unreachable
  • uvx flit used in place of a separately installed flit across all verify scripts
  • TOML verification pre-commit hook added to ui/sdk/.pre-commit-config.yaml

How I tested this

After introducing these changes I could successfully run the verification shell scripts for all distributions as well as uv run scripts/apache_release_helper.py --package {pkg} {ver} 0 -ns

Notes

I had include the version bump commit so that apache_release_helper.py runs correctly (with the new versions). We might want to consider making the version mismatch non-fatal when building packages with no intention to upload them.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@Dev-iL Dev-iL requested a review from skrawcz May 28, 2026 08:02
skrawcz and others added 12 commits May 28, 2026 11:10
The UI wheel must include compiled frontend assets (hamilton_ui/build/).
This directory is gitignored and only exists after npm run build.

- apache_release_helper.py: automatically runs npm install + npm run build
  and copies output to hamilton_ui/build/ before flit build for the UI package
- verify-sub-packages.md: documents manual frontend build steps
- verify_ui.sh: notes that source tarball build is backend-only;
  functional tests use the pre-compiled wheel from SVN
So flit is not needed as a separate dep
…out shadowing venv packages

Python puts '' (cwd) at the front of sys.path; when scripts run from the repo root,
that resolves to the local hamilton checkout and shadows packages installed in the
test venv (e.g. hamilton.contrib.version not found).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- apache-hamilton-sdk: 0.8.0 -> 0.9.0
- apache-hamilton-ui: 0.0.17 -> 0.0.18
- apache-hamilton-lsp: 0.1.0 -> 0.2.0
- apache-hamilton-contrib: 0.0.8 -> 0.0.9
- Update root pyproject.toml extras to point to apache-hamilton-{lsp,sdk,ui}
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