acoustic-carpenter-78188
04/10/2026, 8:18 PMpyflyte run --remote -p flyteexamples --image template-name=container_registry/name:version reproduce.py test_task
The resulting Flyte task has not substiituted the image into the template
Image
Expected behavior
I would expect the image to be container_registry/name:version as per the --image argument provided. This works correctly if the image name uses `_`s instead of `-`s.
The problem is because the templating uses a overly restrictive regex. _IMAGE_REPLACE_REGEX = re.compile(r"({{\s*\.image[s]?(?:\.([a-zA-Z0-9_]+))(?:\.([a-zA-Z0-9_]+))?\s*}})", re.IGNORECASE) allows _ but not -.
Additional context
Its somewhat debatable whether this should be considered a bug or a feature request. I opted to select bug, because I found it very unexpected (I spent hours debuggig this) and it seems like a simple fix.
Screenshots
No response
Are you sure this issue hasn't been raised already?
• Yes
Have you read the Code of Conduct?
• Yes
flyteorg/flyte