fix: hard-fail rendering an image with neither a tag nor a digest#6464
Merged
eamonnmoloney merged 2 commits intoJun 26, 2026
Merged
Conversation
Builds on the imageTagByParams "" coalescing: imageByParams now calls `fail` with an actionable message when the resolved image has no tag and no digest, instead of rendering "<repository>:" — an unquoted, trailing-colon reference that Helm rejects with a cryptic "mapping values are not allowed" error far from the real cause. Update the 8.10 web-modeler subchart pull-secret test to set a tag: its camundaHub.webModeler.image override previously rendered a tag-less websockets image (the camundaHub overlay carries no tag default and is selected wholesale over webModeler.image), which the new guard correctly rejects. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verifies that setting camundaHub.webModeler.image.repository without a tag or digest triggers the fail guard added in imageByParams. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hisImminence
approved these changes
Jun 26, 2026
hisImminence
left a comment
Contributor
There was a problem hiding this comment.
Reviewed and pushed one addition: TestContainerImageWithoutTagOrDigestFails in charts/camunda-platform-8.10/test/unit/web-modeler/deployment_test.go.
Sets camundaHub.webModeler.image.repository without a tag or digest (making the map non-empty/truthy so or selects it over the default webModeler.image), then asserts err is non-nil and contains "neither a tag nor a digest". Runs for both restapi and websockets components — passes both. Locks in the fail guard so a future regression would be caught immediately.
Otherwise LGTM. Logic is sound, error message is actionable, 8.8/8.9 test suites are unaffected (they use the webModeler.image path which carries a chart-default tag).
bf25218
into
fix/nightly-empty-image-tag-digest-strip
82 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem does the PR fix?
Follow-up hardening to #6462. When an image resolves with neither a tag nor a digest, the chart rendered an unquoted, trailing-colon reference (
<repository>:) that Helm rejected with the crypticyaml: line NN: mapping values are not allowed in this context— far from the real cause. This PR makes that a clear, immediate failure.What's in this PR?
charts/camunda-platform-8.8|8.9|8.10/templates/common/_helpers.tpl—camundaPlatform.imageByParamsnow callsfailwith an actionable message (image %q has neither a tag nor a digest; set image.tag or image.digest) instead of emitting a version-less image reference. Relies on theimageTagByParams| default ""coalescing from fix: fail clearly when an image override has an empty tag and no digest #6462 so the empty check is reliable (the helper previously yielded the<no value>sentinel).charts/camunda-platform-8.10/test/unit/web-modeler/deployment_test.go—TestContainerSetImagePullSecretsSubChartnow setscamundaHub.webModeler.image.tag. That scenario previously rendered a tag-less websockets image: thewebModeler.websockets.imagehelper selectscamundaHub.webModeler.imagewholesale viaorwhen it is set, and that overlay carries no tag default (unlikewebModeler.image), so the SM tag default was bypassed. The new guard correctly rejects the tag-less render, so the test now supplies a valid tag.Behavior change / scope note. This turns a previously-tolerated (but broken) tag-less image render into a hard template error. Normal SM deploys are unaffected (they resolve a tag from
webModeler.image.tag/ component defaults). The case this newly rejects is an incomplete image override that sets registry/repository (or acamundaHub.*image block) without a tag or digest — which would only ever produce an unpullable image at runtime.Checklist
Please make sure to follow our Contributing Guide.
Before opening the PR:
make go.update-golden-only.After opening the PR: