acoustic-carpenter-78188
06/16/2026, 1:12 PMpyflyte register --image (e.g. `gcr.io/project/image:tag@sha256:digest`), the registered task spec contains an invalid image reference with : instead of @ before the digest: gcr.io/project/image:tag:sha256:digest.
Root Cause
The issue is in the interaction between _parse_image_identifier(), the Image class, and template replacement in `get_registerable_container_image()`:
1. _parse_image_identifier("gcr.io/project/image:tag@sha256:abc123") splits on @ first:
• fqn = "gcr.io/project/image:tag" (tag baked into fqn)
• digest = "sha256:abc123"
• tag = None
2. Image.version returns self.digest or self.tag = "sha256:abc123"
3. When a container task uses the template {{.image.default.fqn}}:{{.image.default.version}}, the replacement produces:
• "gcr.io/project/image:tag" + : + "sha256:abc123"
• = "gcr.io/project/image:tag:sha256:abc123" — invalid reference
The Image.full property handles this correctly (f"{self.fqn}@{self.digest}"), but the template replacement path hardcodes : between fqn and version without checking whether version is a digest.
Steps to Reproduce
pyflyte register \
--image "gcr.io/my-project/my-workflow:1234-abc@sha256:6b107220f2d7e16c0d13b641ebbc1179fe7f0fbbae622a1de212220d7fa2ffa2" \
--project my-project \
--domain production \
--version v1 \
my_workflow/
The registered task will have the container image set to:
gcr.io/my-project/my-workflow:1234-abc:sha256:6b107220f2d7e16c0d13b641ebbc1179fe7f0fbbae622a1de212220d7fa2ffa2
Which Kubernetes rejects:
Failed to apply default image tag "...": couldn't parse image name "...": invalid reference format
Expected Behavior
The image reference should preserve the @ separator:
gcr.io/my-project/my-workflow:1234-abc@sha256:6b107220f2d7e16c0d13b641ebbc1179fe7f0fbbae622a1de212220d7fa2ffa2
Suggested Fix
In get_registerable_container_image() (flytekit/core/python_auto_container.py), when replacing {{.image.<name>.version}}, use @ as the separator if version is a digest (starts with sha256:), or use Image.full instead of separate `fqn`/`version` template replacement.
Version
flytekit v1.16.23
flyteorg/flyteacoustic-carpenter-78188
06/22/2026, 3:05 PM