flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[Housekeeping] Improve ImageSpec error message on wrong registry format

Open davidmirror-ops opened this issue 6 months ago • 1 comments

Describe the issue

When, by mistake, I use an incorrectly formatted registry in the ImageSpec config:

    base_image="ghcr.io/flyteorg/flytekit:py3.9-latest",
    packages=["scikit-learn"],
    registry="ghcr.io/davidmirror-ops/flyte-scklearn:latest", 
)

Instead of failing, pyflyte run throws a misleading message and proceeds with execution:

Image 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 "ghcr.io/davidmirror-ops/flyte-sklearn:latest/flytekit:iF_UE5oVrp6HRxnCSINhEg": couldn't parse image name "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?

  • [X] Yes

Have you read the Code of Conduct?

  • [X] Yes

davidmirror-ops avatar Aug 23 '24 20:08 davidmirror-ops