ci: prevent image overrides for OCI chart deploys#6258
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an OCI chart immutability guard to deploy-camunda matrix run, ensuring published chart artifacts are deployed with their baked-in image versions unless explicitly overridden.
Changes:
- Adds
--force-image-overridesand threads it through matrix run options and workflows. - Suppresses image-tag layers, chart-root image overlays, and
*_IMAGE_TAGenv-file values when--chart-refis used. - Adds unit coverage for OCI immutability behavior and env-file sanitization.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
scripts/deploy-camunda/matrix/runner.go |
Implements OCI immutability mode, image-tag suppression, overlay resolution, and env-file sanitization. |
scripts/deploy-camunda/matrix/matrix_test.go |
Adds tests covering image override suppression and sanitized env-file output. |
scripts/deploy-camunda/cmd/matrix.go |
Adds the --force-image-overrides CLI flag and passes it into matrix run options. |
.github/workflows/test-integration-template.yaml |
Adds the reusable workflow input for forcing image overrides. |
.github/workflows/test-integration-runner.yaml |
Wires the new input into install/upgrade jobs and filters image-tag values in OCI mode. |
|
Code review findings from reading the branch directly. Overall the approach is correct and well-structured — a few things worth addressing before merge. Critical
Important
tmpEnvFile, cleanupEnvFile, err := sanitizeEnvFileForOCIImmutability(opts.EnvFile, opts)
if err != nil {
return err
}
defer cleanupEnvFile() // ← should be here, before the error check aboveIf a future refactor adds an early return between the assignment and the current Missing test coverage:
Minor
The OCI immutability warning log only fires in |
hisImminence
left a comment
There was a problem hiding this comment.
After addressing the comments lgtm! Thanks!
Add an OCI immutability guard to deploy-camunda matrix run so chart refs deploy with their baked-in image versions by default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0e7010d to
5a80fab
Compare
Summary
deploy-camunda matrix run.--chart-refis set, deploy the chart artifact with its baked-in image versions by default.base-image-tags.yamlvalues-digest.yamlvalues-latest.yamlvalues-enterprise.yaml*_IMAGE_TAGkeys from env files--force-image-overridesas an explicit escape hatch for advanced debugging.Root Cause
helmChartVersionis intended to test the immutable OCI chart artifact as released, but the SM workflow path could still override image versions from local git checkout state.This happened through multiple independent paths:
image-tags: trueinci-test-config.yamlforcedbase-image-tags.yamlVALUES_CONFIGalways carriedE2E_TESTS_*_IMAGE_TAGvaluesChartRootOverlayscould still addvalues-digest.yamlorvalues-latest.yamlThis regressed the OCI artifact validation flow seen in:
Related
Validation
go test ./matrix ./cmdfromscripts/deploy-camunda--chart-ref ... --chart-version 13.10.0-rcshows no image override layers--force-image-overridesrestores image override behavior intentionally