Skip to content

Strip v prefix from image-version input#496

Merged
bschwedler merged 2 commits intomainfrom
strip-version-prefix
Apr 28, 2026
Merged

Strip v prefix from image-version input#496
bschwedler merged 2 commits intomainfrom
strip-version-prefix

Conversation

@bschwedler
Copy link
Copy Markdown
Contributor

Summary

Fixes the empty-matrix failure seen on https://github.com/posit-dev/images-connect/actions/runs/25058571626 — the first real dispatch from a product repo after #480 landed.

Product repos dispatch with a git-describe version like v2026.03.0-473-g072bb6fd1f. Bakery version names never carry the v prefix, so --image-version matched nothing and the matrix came back empty.

Changes

  • Strip leading v from IMAGE_VERSION with ${IMAGE_VERSION#v} before building CLI args (both bakery-build-native.yml and bakery-build.yml).
  • Separate bakery ci matrix from the echo that writes $GITHUB_OUTPUT so set -e can catch non-zero exits. Previously the exit code was swallowed inside a command substitution within echo.

Test plan

  • Re-dispatch Connect dev build — matrix should populate correctly.

@bschwedler bschwedler requested a review from ianpittwood as a code owner April 28, 2026 14:35
DEV_STREAM: ${{ inputs.dev-stream }}
CONTEXT: ${{ inputs.context }}
run: |
IMAGE_VERSION="${IMAGE_VERSION#v}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We may want to consider adding a callout in CI.md

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Test Results

1 449 tests  ±0   1 449 ✅ ±0   9m 18s ⏱️ - 1m 56s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 2bf6f89. ± Comparison against base commit f0a45a5.

♻️ This comment has been updated with latest results.

Product repos dispatch with a git-describe version that may include
a leading v (e.g. v2026.03.0-473-g072bb6fd1f). Bakery version names
never have this prefix, so the --image-version filter matches nothing
and the matrix is empty.

Strip the prefix with ${IMAGE_VERSION#v} before building the CLI
args. Also separate the bakery ci matrix call from the echo so that
set -e catches a non-zero exit (previously the exit code was
swallowed inside a command substitution within echo).
- Update image-version input descriptions to note the automatic v
  prefix strip.
- Fix swallowed exit code in bakery-build-pr.yml (same echo+subshell
  pattern as the build workflows).
- Add image-version and dev-stream to both input tables in CI.md.
- Add "Dispatched version doesn't match bakery" to CLAUDE.md CI
  failure modes.
@ianpittwood ianpittwood force-pushed the strip-version-prefix branch from 07a1c30 to 2bf6f89 Compare April 28, 2026 16:05
@bschwedler bschwedler added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 3fad079 Apr 28, 2026
23 checks passed
@bschwedler bschwedler deleted the strip-version-prefix branch April 28, 2026 18:58
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