Skip to content

fix(ci): harden prepare-release ref wait and rollback changelog fetch - #466

Merged
c-vigo merged 1 commit into
devfrom
bugfix/453-smoke-test-dispatch-failed
Mar 27, 2026
Merged

c-vigo merged 1 commit into
devfrom
bugfix/453-smoke-test-dispatch-failed

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

Hardens prepare-release against GitHub API eventual consistency after the smoke-test dispatch failure analyzed in #453: poll until the new release branch ref resolves before commit-action runs, and fetch dev CHANGELOG.md by resolved commit SHA during rollback so the Contents API does not return stale branch content and skip the rollback commit.

Type of Change

  • feat -- New feature
  • 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

  • .github/workflows/prepare-release.yml
    • Add Verify release branch is resolvable step after creating the release branch (uv run retry polling git/ref/heads/$RELEASE_BRANCH).
    • Rollback: always resolve CURRENT_DEV_SHA from git/ref/heads/dev; skip CHANGELOG rollback only when POST_FREEZE_DEV_SHA is set and differs; load current changelog via Contents API ?ref=$CURRENT_DEV_SHA instead of ?ref=dev.
  • assets/workspace/.github/workflows/prepare-release.yml
    • Same verification step using retry (no uv run).
    • Same Contents API change for rollback.
  • CHANGELOG.md / assets/workspace/.devcontainer/CHANGELOG.md

Changelog Entry

### Fixed

- **prepare-release tolerates GitHub API ref propagation and reliable CHANGELOG rollback** ([#453](https://github.com/vig-os/devcontainer/issues/453))
  - Poll until the new release branch ref resolves before `commit-action` commits to it
  - Fetch dev `CHANGELOG.md` by resolved commit SHA during rollback so Contents API staleness does not skip the rollback commit

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

Ran just test-bats locally. Full just test not run for this PR.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

RCA: comment on #453. Node 20 migration for vig-os/commit-action is tracked separately: vig-os/commit-action#28.

Refs: #453

@c-vigo c-vigo self-assigned this Mar 27, 2026
@c-vigo
c-vigo requested a review from Copilot March 27, 2026 11:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the prepare-release GitHub Actions workflow against GitHub API eventual consistency issues observed in smoke-test dispatch failures, ensuring the release branch ref is resolvable before committing to it and making rollback CHANGELOG fetching deterministic.

Changes:

  • Add a polling step to verify the newly created release/<version> ref is resolvable before running vig-os/commit-action.
  • Update rollback logic to fetch CHANGELOG.md using a resolved dev commit SHA (CURRENT_DEV_SHA) instead of ref=dev to avoid Contents API staleness.
  • Document the fix in both repository and workspace-template changelogs under ## Unreleased.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/workflows/prepare-release.yml Adds ref-resolvability polling and makes rollback CHANGELOG retrieval use CURRENT_DEV_SHA.
assets/workspace/.github/workflows/prepare-release.yml Mirrors the ref-resolvability polling and SHA-pinned rollback CHANGELOG fetch in the workspace template.
CHANGELOG.md Records the workflow hardening under ## Unreleased → ### Fixed.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the changelog entry in the workspace template devcontainer changelog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@c-vigo
c-vigo merged commit 59e3411 into dev Mar 27, 2026
15 checks passed
@c-vigo
c-vigo deleted the bugfix/453-smoke-test-dispatch-failed branch March 27, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants