Repository navigation
chore: release 0.3.9 - #643
Merged
Merged
Conversation
Syncs `dev` with `main` (sync-main-to-dev workflow).
Adds a bats spec and fixture for a select-rc-draft-releases helper that enumerates RC draft pre-releases for a base version from a GitHub releases list. The helper does not exist yet, so the spec fails (exit 127) and pins the contract for the cleanup fix. Refs: #623
Enumerates RC draft pre-releases for a base version directly from the GitHub releases list, emitting "<id>\t<tag>" for each draft pre-release tagged X.Y.Z-rcN. Seeding from releases (not git tags) lets cleanup delete drafts by id and reclaim drafts whose RC tag was already removed by an earlier partial run. Refs: #623
… removal The cleanup step deleted RC draft pre-releases with `gh release delete <tag>`, but that resolves the release via the get-release-by-tag API, which never returns drafts -- so every delete failed while the code fell through and deleted the git RC tag anyway. Because the loop was seeded from `git ls-remote --tags`, the now-tagless draft became undiscoverable and survived every later run, accumulating in the smoke-test repo. Rework cleanup in both promote-release workflows: - Seed from the releases list (not git tags), so drafts whose RC tag was already removed by an earlier partial run are reclaimed. - Delete each RC draft pre-release by release id via the releases API. - Delete a git RC tag only when no GitHub Release is still attached, preserving published pre-releases and keeping a failed-delete draft discoverable. - Verify no RC draft pre-release survives and fail loudly if one does. The upstream workflow uses the new bats-tested select-rc-draft-releases helper; the self-contained workspace template inlines the same jq filter. Refs: #623
The image installs just from its latest release, which advanced to 1.54.0, so the pinned minor-version assertion (1.53.) failed in Image Tests. Update the expectation to match. Refs: #623
… removal (#624) ## Description `promote-release.yml` left RC **draft pre-releases** stranded in the smoke-test repo every release cycle (e.g. `0.3.7-rc1`, `0.3.8-rc1` are currently orphaned). The cleanup step (added in #601) identified each RC draft correctly but deleted it with `gh release delete <tag>`, which resolves the release via the *get-release-by-tag* API — an endpoint that never returns drafts. So the delete failed (`WARN: failed to delete RC draft pre-release …`), yet the code fell through and deleted the git RC tag anyway. Since the loop was seeded from `git ls-remote --tags`, the now-tagless draft became undiscoverable and survived every subsequent run. Root cause confirmed from the `0.3.8` promote run log in the smoke-test repo: ``` Deleting RC draft pre-release 0.3.8-rc1 (draft pre-release) WARN: failed to delete RC draft pre-release 0.3.8-rc1 Deleting remote tag 0.3.8-rc1 (no GitHub Release) ``` ## Type of Change - [ ] `feat` -- New feature - [x] `fix` -- Bug fix - [ ] `docs` -- Documentation only - [ ] `chore` -- Maintenance task (deps, config, etc.) - [ ] `refactor` -- Code restructuring (no behavior change) - [ ] `test` -- Adding or updating tests - [ ] `ci` -- CI/CD pipeline changes - [ ] `build` -- Build system or dependency changes - [ ] `revert` -- Reverts a previous commit - [ ] `style` -- Code style (formatting, whitespace) ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made Rework the cleanup step in **both** promote-release workflows: - **`.github/scripts/select-rc-draft-releases.sh`** (new) — enumerates RC draft pre-releases for a base version from a GitHub releases list, emitting `<id>\t<tag>` for each `draft && prerelease` whose tag is `X.Y.Z-rcN`. Bats-tested. - **`.github/workflows/promote-release.yml`** — cleanup now: (1) seeds from the releases list, not git tags, so drafts whose RC tag was already removed by an earlier partial run are reclaimed; (2) deletes each RC draft by **release id** (works for drafts); (3) deletes a git RC tag only when no GitHub Release is still attached (preserves published pre-releases and keeps a failed-delete draft discoverable); (4) verifies no RC draft survives and fails loudly otherwise. Uses the new helper. - **`assets/workspace/.github/workflows/promote-release.yml`** — same fix; since consumer repos don't ship `.github/scripts`, the template inlines the equivalent jq filter. - **`tests/bats/select-rc-draft-releases.bats`** + **`tests/bats/fixtures/releases-list.json`** (new) — 8 cases covering selection, draft/prerelease/base filtering, malformed suffixes, and arg validation. - **`CHANGELOG.md`** / synced **`assets/workspace/.devcontainer/CHANGELOG.md`** — Fixed entry. ## Changelog Entry ### Fixed - **Stop promote-release cleanup from orphaning RC draft pre-releases** ([#623](#623)) - The cleanup step deleted RC draft pre-releases with `gh release delete <tag>`, which cannot resolve a draft, then deleted the git RC tag anyway — stranding the draft and making it undiscoverable on later runs (the loop was seeded from git tags) - Cleanup now enumerates RC draft pre-releases from the releases list, deletes them by release id, removes a git RC tag only when no release is attached, and fails loudly if any RC draft survives — also reclaiming drafts whose tag was already removed by an earlier partial run ## Testing - [x] Tests pass locally (`just test`) - [ ] Manual testing performed (describe below) ### Manual Testing Details - New bats suite passes (8/8); full bats suite green except the pre-existing `worktree.bats` tmux integration test (unrelated; `skip`ped in CI). - Simulated the new selection + tag-retention logic against `tests/bats/fixtures/releases-list.json`: RC drafts of the base are selected by id; published pre-releases and other base versions are retained; `HAS_RELEASE` correctly keeps tags that still have a release and deletes orphans. - shellcheck + yamllint clean on the changed files. ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly (edit `docs/templates/`, then run `just docs`) - [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and pasted the entry above) - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published ## Additional Notes The two already-orphaned drafts (`0.3.7-rc1`, `0.3.8-rc1`) in `vig-os/devcontainer-smoke-test` are not removed by this PR; the next final promote will reclaim them now that cleanup seeds from the releases list, or they can be deleted manually. Refs: #623
Move Unreleased content to [0.3.9] - TBD and create fresh empty Unreleased section for continued development.
c-vigo
marked this pull request as ready for review
June 23, 2026 07:29
c-vigo
approved these changes
Jun 23, 2026
Set release date to 2026-06-23 and regenerate release docs. Refs: #643
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.
Release 0.3.9 - 2026-06-23
This PR prepares release 0.3.9 for merge to main.
0.3.9 - 2026-06-23
Fixed
gh release delete <tag>, which cannot resolve a draft, then deleted the git RC tag anyway — stranding the draft and making it undiscoverable on later runs (the loop was seeded from git tags)