Repository navigation
feat(vcluster-release): add single release dispatcher action - #162
Merged
Merged
Conversation
sydorovdmytro
force-pushed
the
devops-1050/cut-release-action
branch
from
July 3, 2026 12:26
5d32634 to
223d51a
Compare
One entry point for cutting a vCluster release on any supported line. Routes by numeric era compare against the v0.36 cutover: legacy (< v0.36) fans out to both loft-sh/vcluster and loft-sh/vcluster-pro (OSS first), monorepo (>= v0.36) dispatches loft-sh/vcluster-pro only. Creates the tag(s) and dispatches each line's own release.yaml via workflow_dispatch; the GitHub Release is a pipeline output, not a trigger. Named per-product (vcluster-release) since this shared repo releases multiple products. See DEVOPS-1050.
sydorovdmytro
force-pushed
the
devops-1050/cut-release-action
branch
from
July 3, 2026 14:24
675bf3d to
11c6416
Compare
loft-bot
reviewed
Jul 6, 2026
- guard the jq null-string hazard in create_tag with '.object.sha // empty' plus an explicit non-empty check, matching this repo's gh api convention - emit a partial-failure recovery notice after the legacy OSS dispatch and document the recovery path in the README (non-atomic tag+dispatch sequence) - assert the tag-before-dispatch invariant in the legacy dry-run test - add live (non-dry-run) happy-path coverage for legacy and monorepo flows - add a GH_STUB_UNEXPECTED mode covering the unexpected-HTTP-status arm of branch_exists References DEVOPS-1050
…se-action # Conflicts: # Makefile # README.md
Previously any INPUT_DRY_RUN value other than exactly 'true' ran a real
cross-repo release, so a typo ('yes', '1', 'True', stray whitespace) would
silently cut for real - fail-open on a release-cutting action. Now only an
explicit, case-insensitive 'false' fires; every other value stays in dry-run
and warns. Covered by two new bats cases.
References DEVOPS-1050
Piotr1215
requested changes
Jul 8, 2026
Piotr1215
left a comment
Contributor
There was a problem hiding this comment.
Solid action - routing, guards, dry-run fail-closed, and the 31 bats cases all look good, and I confirmed the semver-validation pin resolves to semver-validation/v1. One real bug: the double-cut tag guard uses the plural prefix-matching git/refs/tags/ endpoint, so cutting a final release while its rc tag exists (or a version like v0.35.4 vs an existing v0.35.40) falsely trips 'already exists'. One-char fix inline. Second note is optional.
… errors Double-cut guard used the plural git/refs/tags/ endpoint, which prefix-matches: cutting the final v0.35.4 after v0.35.4-rc.1 exists tripped a false "already exists". Switch to the singular git/ref/tags/ (exact match, 404s otherwise). guard_not_released also read any non-zero exit as "not released", so a transient API error (rate-limit/auth/DNS) silently skipped the double-cut check. Extract the HTTP-status discrimination from branch_exists into a shared api_exists helper and route both guard probes (release + tag) through it, so a transient failure aborts loudly instead of being misread as absent. Model the real API in the bats stub (singular exact / plural prefix) and add a scoped transient knob so both fixes are regression-covered.
Piotr1215
approved these changes
Jul 8, 2026
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
vcluster-releasecomposite action: one entry point for cutting a vCluster release on any supported line, so nobody has to remember which release procedure a version needs.vcluster-release, notcut-release) since this shared repo releases multiple products and the action is vcluster-specific (hardcodesloft-sh/vcluster+loft-sh/vcluster-proand thev0.36cutover). Leaves room for e.g.platform-releaselater.(major, minor)compare against thev0.36cutover: legacy (< v0.36) fans out to bothloft-sh/vclusterandloft-sh/vcluster-pro(OSS first); monorepo (>= v0.36) dispatchesloft-sh/vcluster-proonly.release.yamlviaworkflow_dispatch(gh workflow run --ref <tag>, which runs the tagged commit's version). The GitHub Release is a pipeline output, not a trigger — so a monorepo-created OSS release can't re-trigger the OSS builder.dry-rundefault that still runs the read-only routing checks.Test plan
make test-vcluster-release— 26 bats cases: pure routing (parse_major_minor/derive_line/classify_eraincl. numericv0.9 < v0.36andv1.0boundary), legacy dispatch order (OSS before pro), double-cut guards, monorepomainfallback, and the 404-vs-transient distinction (stub mirrors realghexiting non-zero on 404).make lint(actionlint + zizmor, whole repo) clean;make check-docsup to date.v0.35.99routes OSS→pro; monorepov0.36.99falls back tomain; the double-cut guard correctly refused a real existing release.Notes
unpinned-useszizmor finding on the siblingsemver-validationreference is expected (internal action pinned by SHA + tag comment per this repo's convention).workflow_dispatchbutton inloft-sh/vcluster-pro(separate PR, held until this merges andvcluster-release/v1is tagged).References DEVOPS-1050