ci: fix OCI release artifact deploys applying wrong image version overlay#6259
ci: fix OCI release artifact deploys applying wrong image version overlay#6259hisImminence wants to merge 1 commit into
Conversation
…rlay When helmChartVersion is set (OCI deploy), the runner was either injecting SNAPSHOT tags from base-image-tags.yaml or falling through to values-digest.yaml — both wrong. The chart's own values.yaml should be the sole source of truth. Root causes: - entry.ImageTags=true hardcoded in all qa-* scenarios blocked overlay selection - TEST_IMAGE_TAGS env var was set in the workflow but never consumed - No runtime mechanism to override per-scenario image-tags config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes OCI release artifact deploys incorrectly applying chart-root image version overlays (values-digest.yaml / values-latest.yaml) from the local git checkout. Adds a DisableImageTags runtime override that trumps the per-scenario image-tags: true flag, and an OCI short-circuit so no overlay is applied when --chart-ref is set. Also wires the previously-dead TEST_IMAGE_TAGS env var in the workflow to a new --disable-image-tags CLI flag.
Changes:
- Add
RunOptions.DisableImageTags+effectiveImageTagshelper applied at all 4entry.ImageTagssites; extract sharedchartRootOverlayshelper with OCI short-circuit. - Add
--disable-image-tagsCLI flag. - Wire
TEST_IMAGE_TAGS=falseto--disable-image-tagsin install/upgrade workflow blocks; add unit tests for the two new helpers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/deploy-camunda/matrix/runner.go | Adds DisableImageTags option, effectiveImageTags helper, extracted chartRootOverlays with OCI short-circuit. |
| scripts/deploy-camunda/matrix/matrix_test.go | Unit tests for effectiveImageTags and chartRootOverlays. |
| scripts/deploy-camunda/cmd/matrix.go | Adds --disable-image-tags CLI flag. |
| .github/workflows/test-integration-runner.yaml | Wires TEST_IMAGE_TAGS=false to --disable-image-tags in both install and upgrade blocks. |
|
Closing in favour of #6258 by @bkenez which takes a cleaner approach: OCI immutability is activated automatically from |
Problem
When
helmChartVersionis set (OCI deploy, e.g.13.10.0-rc), the runner should deploy the chart exactly as released — no external image version overlay — so the chart's ownvalues.yamlis the sole source of truth.Two bugs prevented this:
entry.ImageTags=trueis hardcoded in allqa-*scenarios (ci-test-config.yaml). This blocked overlay selection entirely, causing the runner to skip bothvalues-digest.yamlandvalues-latest.yaml, but only by accident — with no OCI awareness.TEST_IMAGE_TAGSenv var was set in the workflow but never consumed.include-image-tags=falsehad zero effect on the actual deploy — the runner never received the signal.This is a follow-up to #6253 addressing the review feedback from @bkenez: applying
values-latest.yamlfrom the git checkout onto an OCI artifact is as wrong as injecting SNAPSHOTs — the git checkout drifts from what was baked into the RC.Fix
runner.go— addsDisableImageTags booltoRunOptions(same runtime-override pattern asUseQA), extracts a namedchartRootOverlays(entry, opts)helper, and adds an OCI short-circuit:This also removes the 19-line IIFE closure in
executeEntryand deduplicates it withresolveChartRootOverlaysQuiet, so all three callers (execute, dry-run, coverage) share one code path.matrix.go— adds--disable-image-tagsCLI flag wired toDisableImageTags.test-integration-runner.yaml— wires the existingTEST_IMAGE_TAGSenv var (previously dead) to--disable-image-tags, for both the install and upgrade blocks.Flag decision table
For
qa-*scenarios (all haveimage-tags: trueinci-test-config.yaml):--disable-image-tags--chart-refset--use-latestbase-image-tags.yamlseparatelyvalues-latest.yamlvalues-digest.yamlIn the workflow:
TEST_IMAGE_TAGS=true(default, nightly) → no--disable-image-tags→ SNAPSHOT path unchangedTEST_IMAGE_TAGS=false+helmChartVersion→--disable-image-tags+--chart-ref/--chart-version→ no overlayTest plan
SM On-Demand 8.8+ Installwithinclude-image-tags=falseandhelmChartVersion=13.10.0-rc— verify pods use the chart's own image versions (e.g.camunda/camunda:8.8.24), not SNAPSHOTs and not git-checkout overridesinclude-image-tags=trueand SNAPSHOT inputs — verify existing nightly behaviour unchangedgo test ./matrix/... -run "TestEffectiveImageTags |TestChartRootOverlays"passes (14 new cases)🤖 Generated with Claude Code