Conversation
Add `release_type: prep` and `make release-prep` so the GAS team can smoke-test a SHA-tagged internal-registry image during a one-day internal QA window before rc1 publishes to Docker Hub. `cmd_prep` carries the scope-lock side effects: pushes `release/vX.Y.Z` from main HEAD, fires the rule #16 webhook, opens the dev-bump PR, and triggers Jenkins with `pushImageDocker=false`. The next-day `make release-rc RC=1` dispatch detects the existing release branch on origin and switches into an after-prep path: probes each scope-lock side effect independently (webhook re-fires harmlessly because rule #16 is idempotent; dev-bump PR is gated on a separate bump-branch probe so an interrupted prep gets repaired rather than skipped). The fresh-from-main path is unchanged. Parameterise `make trigger-jenkins` with `PUSH_IMAGE_DOCKER` (default `true`) instead of adding a `trigger-jenkins-internal` sibling target.
- _sync_after_prep_branch: abort on `git rev-list --count` non-zero exit rather than silently coercing ahead_count to 0 and proceeding with the reset --hard. A failing rev-list is precisely the ambiguous state where resetting is most dangerous. - _patch_rc_ok: drop the dead initial monkeypatch.setattr that was immediately overwritten by the ordered_runner installation.
The branch-existence probe was unreliable: GitHub auto-deletes the bump-dev-version branch after the PR merges (the recommended setting), which would silently cause `rc1 after prep` to re-fire the dev-bump helper and abort at the empty `git commit`. Probe `origin/main`'s pyproject.toml version directly instead — if it already equals `X.Y+1.0.dev0`, the PR landed and we skip the dev-bump call regardless of branch state. As a defensive guard, if main is not yet bumped but the bump branch is on origin (an open PR awaiting merge), exit with a clear operator instruction rather than recreate the duplicate branch.
yyyyyyyan
requested review from
a team,
marcuscruz-percona and
maxbube
as code owners
May 19, 2026 03:36
Contributor
There was a problem hiding this comment.
Pull request overview
Splits the Release GitHub Actions workflow into a Day-27 prep step and the existing Day-28 rc1 step so the GAS team can validate a SHA-tagged internal-registry image during an internal QA window before rc1 publishes to Docker Hub. The split factors out scope-lock side effects (release branch creation, Jira version-create webhook, dev-bump PR) into prep, keeps rc1 idempotent against a prior prep via remote-branch probing, and parametrises make trigger-jenkins with PUSH_IMAGE_DOCKER.
Changes:
- New
cmd_prep+make release-prep+prepargparse subcommand triggering an internal-only Jenkins build tagged by HEAD SHA. cmd_rc(RC=1)made idempotent against a prior prep: probesorigin, syncs non-destructively, re-fires the webhook, gates the dev-bump PR onorigin/main'spyproject.toml.make trigger-jenkinsacceptsPUSH_IMAGE_DOCKER(defaults totrue); workflow YAML addsprepchoice and validatesrc_numberempty for prep.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/release.py | Adds cmd_prep, _remote_branch_exists, after-prep helpers, and dev-bump idempotency for cmd_rc. |
| tests/scripts/test_release.py | Adds 22 unit tests covering prep happy path, preconditions, ordering, and cmd_rc after-prep idempotency / probes. |
| Makefile | Adds release-prep target and parameterises trigger-jenkins with PUSH_IMAGE_DOCKER (default true). |
| .github/workflows/release.yml | Adds prep choice, validates rc_number is empty for prep, dispatches make release-prep. |
Contributor
Author
Code reviewFound 1 issue:
Lines 17 to 38 in 8a0b5dc |
The error fires AFTER the rc1 commit, tag, GitHub pre-release, and Jenkins trigger have already published. The old message told the operator to "re-run rc1", which would fail on the existing tag/commit. The actual recovery path is just merging the dev-bump PR by hand before the next release cycle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split the
ReleaseGitHub Actions workflow into two dispatches so the GAS team can validate a SHA-tagged internal-registry image during a 1-day internal QA window beforerc1publishes to Docker Hub.release_type: prep(Day 27) —cmd_prep+make release-prepcreaterelease/vX.Y.Zfrom main HEAD, fire the rule SEP-79: Add environment to the inventory #16 Jira version-create webhook, open themain → vX.Y+1.0.dev0dev-bump PR, build the wheel, and trigger Jenkins withpushImageDocker=false(SHA-tagged internal-registry image only). No version bump, no tag.cmd_rc(RC=1)made idempotent against a prior prep — probesoriginfor the existing release branch and switches into an after-prep path: syncs non-destructively toorigin/{branch}(refuses to reset when local is ahead), re-fires the rule SEP-79: Add environment to the inventory #16 webhook (rule is naturally idempotent), and gates the dev-bump PR call onorigin/main's actualpyproject.tomlversion. The fresh-from-main path is bit-for-bit unchanged (AC Basic inventory #6).make trigger-jenkinsparameterised withPUSH_IMAGE_DOCKER(defaulttrue). Deviation from the AC's literal wording (trigger-jenkins-internal SHA=<sha>orMODE=internal): chose this variable-on-existing-target approach as a finer-grained third path. Pre-approved in the implementation plan.prepto the choices, validatesrc_numbermust be empty for prep, and dispatches tomake release-prep.cmd_prephappy path + preconditions + ordering + head-sha → Jenkins,cmd_rcafter-prep idempotency (webhook re-fire, dev-bump skip-when-main-bumped, error-when-PR-unmerged, non-destructive sync, refuse-when-local-ahead, abort-on-rev-list-failure, still-bumps-and-tags),_remote_branch_existsexit-code switch (0 / 2 / 128), andprepargparse plumbing.The workflow doc (release-process.md) is documented separately and synced to Notion — the file is gitignored locally and does not ship in this PR.
Tested
pytest tests/scripts/test_release.py -v(57 tests pass),make -n release-prep VERSION=0.99.0,make -n trigger-jenkins TAG=abc PUSH_IMAGE_DOCKER=false, andpython3 scripts/release.py --help. The real integration test is the next release cycle's Day 27 dispatch by the release manager.Checklist
Database migrations generated if models changed ((N/A — no model changes)make makemigrations)User-facing changes documented (README, inline help, UI text)(N/A — release process change, documented in the workflow doc)