Skip to content

fix(ci): align downstream candidate RC with upstream dispatch tag - #442

Merged
c-vigo merged 5 commits into
release/0.3.1from
bugfix/441-fix-downstream-rc-tag-mismatch
Mar 25, 2026
Merged

c-vigo merged 5 commits into
release/0.3.1from
bugfix/441-fix-downstream-rc-tag-mismatch

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Description

When upstream publishes a candidate such as 0.3.1-rc21 and dispatches to devcontainer-smoke-test, the downstream workspace release.yml used to auto-increment the RC from local tags only, producing 0.3.1-rc1 and breaking the upstream final-release gate that expects a downstream pre-release at the same RC tag.

This change passes the numeric RC suffix from the dispatch tag through smoke-test orchestration into workspace release.yml / release-core.yml via optional rc-number, and documents the contract for cross-repo alignment.

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

  • assets/smoke-test/.github/workflows/repository-dispatch.yml
    • Derive rc_number from client_payload.tag when it matches X.Y.Z-rcN
    • Expose rc_number on validate job outputs; pass -f rc-number=… when triggering downstream release.yml for candidates
    • Extend dispatch summary with base version and RC suffix
  • assets/workspace/.github/workflows/release.yml
    • Add optional workflow_dispatch input rc-number; forward to release-core as rc_number
  • assets/workspace/.github/workflows/release-core.yml
    • Add optional workflow_call input rc_number; when set for candidate mode, use it instead of scanning remote tags for the next RC (with validation >= 1)
  • tests/bats/just.bats
    • Smoke tests for dispatch rc_number wiring and workspace rc-number / rc_number inputs
  • docs/CROSS_REPO_RELEASE_GATE.md, docs/DOWNSTREAM_RELEASE.md
    • Document when and how to pass rc-number for cross-repo RC alignment
  • CHANGELOG.md, assets/workspace/.devcontainer/CHANGELOG.md

Changelog Entry

Under ## [0.3.1] - TBD → ### Fixed:

- **Downstream candidate RC tag can match upstream dispatch** ([#441](https://github.com/vig-os/devcontainer/issues/441))
  - Workspace `release.yml` / `release-core.yml` accept optional `rc-number` so candidate tags are not always recomputed from local tags only
  - Smoke-test `repository-dispatch.yml` exposes `base_version` and `rc_number` job outputs for orchestration that calls workspace `release.yml`

Testing

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

Manual Testing Details

N/A — workflow and template changes; BATS coverage exercises template invariants.

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 active release section (## [0.3.1] - TBD) (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

Branch was created from release/0.3.1; this PR should target release/0.3.1 (patch line), not dev.

Refs: #441

@c-vigo c-vigo self-assigned this Mar 25, 2026
@c-vigo
c-vigo requested a review from Copilot March 25, 2026 14:18

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

This PR fixes cross-repo candidate release orchestration so the downstream repository’s candidate tag (X.Y.Z-rcN) matches the upstream dispatched RC suffix, preventing final-release gate failures when the downstream repo has no prior RC tags.

Changes:

  • Extract rc_number from the upstream dispatch tag (X.Y.Z-rcN) in the smoke-test repository-dispatch.yml workflow and forward it as rc-number when triggering downstream release.yml.
  • Add optional rc-number / rc_number inputs to workspace release.yml and reusable release-core.yml, using the provided RC suffix instead of auto-increment when set.
  • Add BATS assertions and documentation updates describing the RC-alignment contract.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
assets/smoke-test/.github/workflows/repository-dispatch.yml Extracts/exports base_version + rc_number, forwards rc-number to downstream release.yml, and adds summary context.
assets/workspace/.github/workflows/release.yml Adds optional workflow_dispatch input rc-number and forwards it to release-core.yml as rc_number.
assets/workspace/.github/workflows/release-core.yml Adds optional workflow_call input rc_number and uses it to pin candidate RC tag selection with validation.
tests/bats/just.bats Adds smoke-test assertions that the new wiring keys exist in the workflow templates.
docs/CROSS_REPO_RELEASE_GATE.md Documents how to pass rc-number and where to read it from (needs.validate.outputs.rc_number).
docs/DOWNSTREAM_RELEASE.md Documents the optional rc-number behavior for candidate mode.
CHANGELOG.md Adds a fixed entry describing the RC alignment fix.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the changelog entry into the workspace template changelog.

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

@c-vigo
c-vigo merged commit a23aa66 into release/0.3.1 Mar 25, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/441-fix-downstream-rc-tag-mismatch branch March 25, 2026 14:48
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