acoustic-carpenter-78188
06/16/2026, 1:40 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.
The root cause is in `get_registerable_container_image()`: when replacing {{.image.<name>.version}} in a template, the version value is substituted directly but the separator before the placeholder is always : (hardcoded in the template). When version is a digest (e.g. sha256:...), the separator should be @.
Example:
• Template: {{.image.default.fqn}}:{{.image.default.version}}
• Image: gcr.io/project/image:tag@sha256:abc123
• Before fix: gcr.io/project/image:tag:sha256:abc123 (invalid)
• After fix: gcr.io/project/image:tag@sha256:abc123 (valid)
This also affects digest-only references (no tag):
• Image: gcr.io/project/image@sha256:abc123
• Before fix: gcr.io/project/image:sha256:abc123 (invalid)
• After fix: gcr.io/project/image@sha256:abc123 (valid)
What changes were proposed in this pull request?
In get_registerable_container_image(), when the resolved version is a digest (contains :), replace the preceding : separator with @ in the output. Tags never contain :, so the check is unambiguous.
How was this patch tested?
Added test cases for both scenarios to `test_container_image_conversion`:
1. Digest-only image (fqn without tag) with : template separator
2. Tag+digest image (fqn contains baked-in tag) with : template separator — the real-world case from _parse_image_identifier("repo:tag@sha256:...")
Existing tests continue to pass.
flyteorg/flytekitacoustic-carpenter-78188
06/22/2026, 3:05 PM