Skip to content

fix(controller): derive full runtime image from the tag name - #2640

Open
rtemperini wants to merge 2 commits into
kagent-dev:release/v0.10.xfrom
rtemperini:fix/full-image-tag-digest
Open

fix(controller): derive full runtime image from the tag name#2640
rtemperini wants to merge 2 commits into
kagent-dev:release/v0.10.xfrom
rtemperini:fix/full-image-tag-digest

Conversation

@rtemperini

@rtemperini rtemperini commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #2586.

Declarative skills agents built the full runtime image by appending -full to IMAGE_TAG. A digest-pinned tag such as 0.10.0-rc3@sha256:… became …@sha256:…-full, which is not a valid OCI reference. The slim and full tags are also different images, so reusing the slim digest would be wrong even if the syntax were valid.

What changed

The controller parses IMAGE_TAG as a tag, a tag@digest, or a digest-only value. The -full suffix is applied only to the tag name (0.10.0-rc3 becomes 0.10.0-rc3-full). The slim digest is never reused on the full image.

Released builds always bake an upstream full digest (ldflags). That value is sandbox fallback only. Declarative skills agents pin the full variant only when the operator sets controller.agentImage.fullDigest at runtime.

What operators should set

  • Bare tag (0.10.0-rc3): the full image is app:0.10.0-rc3-full. Nothing extra to set.
  • Tag plus digest (0.10.0-rc3@sha256:…): the full image is app:0.10.0-rc3-full. To digest-pin that variant, set controller.agentImage.fullDigest (APP_FULL_IMAGE_DIGEST). The baked upstream digest is not used here.
  • Digest-only IMAGE_TAG: fail closed unless that runtime full digest is set.

Same knobs exist for the Go runtime (controller.goAgentImage.fullDigest, GOLANG_ADK_FULL_IMAGE_DIGEST).

Why this branch

main deleted the Agent translator (26732e86). The append lives only on release/v0.10.x.

Tests

go test -race on ./core/internal/controller/translator/agent/, including the 0.10.0-rc3@sha256:deadbeef… regression (must not produce …deadbeef…-full) and a baked-digest case that must stay app:0.10.0-rc3-full.

Digest-pinned IMAGE_TAG values produced an invalid OCI reference when
skills agents appended -full after @sha256. Parse tag vs digest, suffix
only the tag, and pin the full variant only with a dedicated digest.

Signed-off-by: Ricardo Temperini <29879569+rtemperini@users.noreply.github.com>
@rtemperini
rtemperini requested a review from a team as a code owner August 31, 2026 16:38
@github-actions github-actions Bot added the bug Something isn't working label Aug 31, 2026
// Never reuse the slim digest on the full image.
var fullDigest string
if embeddedDigest != "" {
fullDigest = normalizeImageDigest(digest)

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.

Can we align the fallback with what the behavior is here? Controller builds always populate the full image digests with the ldflags script, so digest will be non-empty even when the Helm fullDigest is unset.

For IMAGE_TAG=tag@digest, this emits tag-full@<baked upstream digest>; the tag-only fallback described above and in the PR body is reachable only in builds without those linker flags.

So this needs a way to distinguish between an explicit runtime override and a baked-in digtest.

@rtemperini rtemperini Sep 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure, declarative skills agents now pin the full variant only when fullDigest (APP_FULL_IMAGE_DIGEST) is set at runtime. The baked digest still applies to sandbox agents. IMAGE_TAG=tag@digest with no runtime override is now app:tag-full, never the slim digest and never the baked upstream digest.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

let me know if this covers this case for baked digest without runtime override

Released builds always bake APP full digests via ldflags. Treat that
value as sandbox fallback only. Declarative skills agents pin the full
variant only when Helm fullDigest or the matching flag/env is set.

Signed-off-by: Ricardo Temperini <29879569+rtemperini@users.noreply.github.com>
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants