<#5689 [Housekeeping] Improve ImageSpec error mess...
# flytekit
c
#5689 [Housekeeping] Improve ImageSpec error message on wrong registry format Issue created by davidmirror-ops Describe the issue When, by mistake, I use an incorrectly formatted registry in the ImageSpec config:
Copy code
base_image="<http://ghcr.io/flyteorg/flytekit:py3.9-latest|ghcr.io/flyteorg/flytekit:py3.9-latest>",
    packages=["scikit-learn"],
    registry="<http://ghcr.io/davidmirror-ops/flyte-scklearn:latest|ghcr.io/davidmirror-ops/flyte-scklearn:latest>", 
)
Instead of failing,
pyflyte run
throws a misleading message and proceeds with execution:
Copy code
Image <http://ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:QDS_o1_Z2WBpkL_QFfWuYw|ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:QDS_o1_Z2WBpkL_QFfWuYw> found. Skip building.
Of course the image is not there in the registry, so not sure why it says
found
What if we do not do this? New users could spend cycles troubleshooting this. It's important to note that the console gives a better error message, one that actually points to the problem:
|Failed to apply default image tag "<http://ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:iF_UE5oVrp6HRxnCSINhEg|ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:iF_UE5oVrp6HRxnCSINhEg>": couldn't parse image name "<http://ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:iF_UE5oVrp6HRxnCSINhEg|ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:iF_UE5oVrp6HRxnCSINhEg>": invalid reference format
Related component(s) No response Are you sure this issue hasn't been raised already? • Yes Have you read the Code of Conduct? • Yes flyteorg/flyte