From 8037ccb776a4e4b8ee0412a21edfa6f0c9b39a35 Mon Sep 17 00:00:00 2001 From: Diego Braga Date: Sat, 1 Aug 2026 16:56:48 +0200 Subject: [PATCH] fix(ci): refresh the cdc-runtime-template golden in the chart auto-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bump-consumer-chart-image automation did a tag-only `yq` bump of cdc.image.tag and never refreshed hack/golden/cdc-runtime-template.yaml, which snapshots that tag. So every auto-bump PR failed the chart's cdc-template check and was closed unmerged (cdc-image-1.3.6/1.3.12/1.3.15 = #68/#76/#101) — the pin only ever advanced via manual bumps. Install helm and run ./hack/verify-cdc-template.sh --update alongside the bump (git add -A), so auto-bump PRs land green and mergeable. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/bump-consumer-chart-image.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-consumer-chart-image.yaml b/.github/workflows/bump-consumer-chart-image.yaml index 6f69da8..b59b930 100644 --- a/.github/workflows/bump-consumer-chart-image.yaml +++ b/.github/workflows/bump-consumer-chart-image.yaml @@ -18,6 +18,11 @@ jobs: name: Bump cdc.image.tag in core-provider-chart runs-on: ubuntu-latest steps: + # Needed to regenerate the chart's cdc-runtime-template golden (helm template) below. + - name: Install Helm + uses: azure/setup-helm@v4 + with: + version: v3.19.0 - name: Open chart image-tag bump PR env: GH_TOKEN: ${{ secrets.PAT }} @@ -39,13 +44,20 @@ jobs: # Idempotent in-place set of the pinned CDC image tag. yq -i ".cdc.image.tag = \"${TAG}\"" chart/values.yaml + # The cdc-runtime-template golden snapshots the CDC image tag, so a tag-only bump would + # fail the chart's cdc-template check and the PR would be closed unmerged. Regenerate the + # golden alongside the bump so the PR lands green and mergeable. + if [ -f hack/verify-cdc-template.sh ]; then + ./hack/verify-cdc-template.sh --update + fi + if git diff --quiet; then echo "chart cdc.image.tag already ${TAG} — nothing to do." exit 0 fi git checkout -b "$BRANCH" 2>/dev/null || { git push origin --delete "$BRANCH" 2>/dev/null || true; git checkout -b "$BRANCH"; } - git add chart/values.yaml + git add -A git commit -m "chore(cdc): bump composition-dynamic-controller image to ${TAG} Automated by the composition-dynamic-controller release (${TAG}): aligns the chart's @@ -53,7 +65,7 @@ jobs: git push origin "$BRANCH" PR_TITLE="chore(cdc): bump composition-dynamic-controller image to ${TAG}" - PR_BODY="Automated on the CDC \`${TAG}\` release: aligns \`cdc.image.tag\` in \`chart/values.yaml\` so the chart deploys the just-released controller." + PR_BODY="Automated on the CDC \`${TAG}\` release: aligns \`cdc.image.tag\` in \`chart/values.yaml\` (and refreshes the \`cdc-runtime-template\` golden) so the chart deploys the just-released controller." PR_STATE=$(gh pr view "$BRANCH" --repo "$TARGET_REPO" --json state -q .state 2>/dev/null || echo "NONE") if [ "$PR_STATE" = "OPEN" ]; then echo "PR already open for $BRANCH."