ci: add RC promotion command#749
Conversation
|
@skrawcz @andreahlert can you review this PR? |
|
@Haricharanpanjwani can you check the CI? |
@andreahlert Fixed the formatting. pre-commit should pass now |
black --line-length=100 reformats scripts/apache_release.py and tests/test_apache_release.py; the pre-commit black hook was failing. Signed-off-by: André Ahlert <andre@aex.partners>
The promote command copied artifacts flat into the dist/release project root and svn-rm'd every existing entry (except KEYS). But dist/release publishes each release under a per-version subdirectory (e.g. dist/release/incubator/burr/0.42.0) and keeps prior releases alongside KEYS. The old flow would have dumped artifacts in the wrong place and deleted already-published releases (0.41.0, 0.42.0). Promote now performs a single server-side 'svn cp <rc_url> <release>/<version>': atomic, no local download of the release tree, and additive. Existing release directories and KEYS are untouched by construction. The command refuses to run if the target version directory already exists. The local RC checkout is kept only to validate the expected artifacts and their .asc/.sha512 companions before promotion. Drops the now-unnecessary flat-copy/remove/commit helpers and the dead RC-suffix rename (release artifact names never carry the RC number; it lives in the dev directory name). README and tests updated to match. Note: the svn workflow is unit-tested with mocked svn but not verified end-to-end against live ASF dist. Signed-off-by: André Ahlert <andre@aex.partners>
|
Thanks @Haricharanpanjwani! I pushed a couple of commits to get this green and to correct the release-side layout. Formatting
Release layout fix Reworked
This also let me drop the flat-copy/remove/commit helpers and the unused RC-suffix rename (the release artifact names never carry the RC number, it lives in the dev directory name). README and tests updated to match; net One caveat: the SVN workflow is unit-tested with mocked Minor follow-up (non-blocking): |
andreahlert
left a comment
There was a problem hiding this comment.
LGTM. Just giving some time to see if another maintainer can take a look.
Part of #715.
Closes #717.
Summary
promotesubcommand toscripts/apache_release.pyto promote a voted RC from Apache SVNdist/devtodist/release.asc/.sha512files before promotionKEYSindist/releaseduring promotion so signature verification material is not deletedtwine uploadcommand for the promoted release artifacts--dry-runso the command shows the intended release cleanup, copy, and commit steps without committing--dev-svn-rootand--release-svn-rootoverridesscripts/README.mdHow I tested this
python3 -m py_compile scripts/apache_release.py tests/test_apache_release.pyKEYSpython3 scripts/apache_release.py promote --helpNotes
scripts/apache_release.pyrather than as a separate script so it stays alongside the existing release build, upload, and verification commands--dev-svn-rootand--release-svn-rootso it can handle the post-incubation TLP path change without code changesKEYS, which lives in the samedist/releasedirectory and must remain available for signature verificationpromote --dry-runagainst live SVN in this environment; the command still requires SVN access to validate the real RC and release paths before planning the promotion stepsChecklist