DEVEX-1650: add _compute-rt-tag composite action for Release Train v2#132
DEVEX-1650: add _compute-rt-tag composite action for Release Train v2#132pdodgen-revparts wants to merge 1 commit into
Conversation
Composite action for the per-repo Build.yaml rt-* push trigger. Computes the next pre-release tag for an rt-N branch and emits both the git tag and a matching GitHub Release (prerelease=true) atomically. Tag format is vX.Y.Z-rc.<N>.<iter> (e.g. v4.7.0-rc.147.3) rather than the originally-proposed vX.Y.Z-rt.<N>.rc.<iter> — composer's VersionParser rejects custom pre-release identifiers like 'rt', accepting only the standard set (rc, beta, alpha, dev, patch). The 3-segment shape distinguishes new v2 tags from legacy 2-segment v1 'vX.Y.Z-rc.<iter>' tags and remains uniquely parseable via 'rc\.(\d+)\.(\d+)'. Base version is derived from the tag at the cut SHA (git merge-base between origin/main and HEAD), relying on main tagging every push. Iter is the count of existing rc.<N>.* tags plus one. Build.yaml must declare a concurrency group on rt-* to prevent iter races; this action does not serialise on its own. Verified against a synthetic git state: correct tag computation, base-version stability when main moves forward, error handling for missing-base, pre-release-rejection (alpha/beta) for base extraction, and no glob collision with legacy 2-segment rc tags.
PR SummaryMedium Risk Overview Tag scheme deviates from the original DEVEX-1579 spec: uses No app Reviewed by Cursor Bugbot for commit 364fb04. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 364fb04. Configure here.
| gh release create "${{ steps.compute.outputs.tag }}" \ | ||
| --prerelease \ | ||
| --title "${{ steps.compute.outputs.tag }}" \ | ||
| --notes "Release Train ${{ steps.compute.outputs.train_number }}, rc.${{ steps.compute.outputs.iter }} (base ${{ steps.compute.outputs.base_version }})" |
There was a problem hiding this comment.
Tag without release on failure
Medium Severity
Tag push and GitHub prerelease creation run as separate steps. If git push succeeds and gh release create fails (or the job is cancelled), the remote tag remains while no matching release exists. A later run counts that tag and bumps iter, leaving a tag with no release and breaking the documented guarantee that tag and prerelease always exist as a pair.
Reviewed by Cursor Bugbot for commit 364fb04. Configure here.
|
|
||
| iter_count=$(git tag -l "${base}-rc.${train_n}.*" | wc -l | tr -d ' ') | ||
| iter=$((iter_count + 1)) | ||
| tag="${base}-rc.${train_n}.${iter}" |
There was a problem hiding this comment.
Base version shifts after main merge
Medium Severity
base_version and the rc tag prefix are derived from git merge-base origin/main HEAD on every run. After origin/main is merged into the rt-N branch, that merge-base moves to the updated main line, so the base tag and ${base}-rc.${train_n}.* iter counting can change mid-train instead of staying fixed at the original cut.
Reviewed by Cursor Bugbot for commit 364fb04. Configure here.
|
Superseded by encodium/release-train#1 — RT v2 machinery moved to a private repo per DEVEX-1650 follow-up. Keeping the action in the public |


Summary
Adds
_compute-rt-tagcomposite action — the foundational piece for Release Train v2 (DEVEX-1579) per-repo Build.yaml rt-* path. Tracked by DEVEX-1650 (Phase 0 spike).Behaviour
On push to
rt-<N>, callers of this action get:prerelease=true— atomically as a pair.Base version comes from
git tag --points-at $(git merge-base origin/main HEAD). Iter is the count of existing${base}-rc.${N}.*tags + 1.Spike found that composer's
VersionParserrejects the originally-proposedvX.Y.Z-rt.<N>.rc.<iter>format. Only standard pre-release identifiers (rc,beta,alpha,dev,patch) are accepted.New format:
vX.Y.Z-rc.<N>.<iter>(e.g.,v4.7.0-rc.147.3).minimum-stability: stable.rc\.(\d+)\.(\d+).vX.Y.Z-rc.<iter>tags.Confirmed with the assignee; spec amendment will follow on the parent ticket.
Tests run locally
v4.6.0,v4.7.0on main,rt-147withrc.147.1,rc.147.2already → action emitsv4.7.0-rc.147.3. ✅v4.7.1after rt-147 cut → base STILLv4.7.0(frozen at cut SHA). ✅v4.7.0-alpha.1) at cut SHA → regex correctly rejects; treated as missing base. ✅rc.147.*doesn't matchrc.7). ✅Caller requirements
Documented in the action's README. Key points:
actions/checkoutwithfetch-depth: 0andfetch-tags: true.Build.yamldeclaresconcurrency: { group: 'rt-build-${{ github.ref }}', cancel-in-progress: false }to prevent iter races.contents: write.Not in this PR
rt-build.yamlyet (Phase 1).start-release-train.yamlorpin-common-on-rt.yamlyet (Phase 1).Reviewing the action's logic + tag format change is the ask.