crc icon indicating copy to clipboard operation
crc copied to clipboard

Show a warning when using `latest` tag

Open redbeam opened this issue 11 months ago • 3 comments

We don't use latest tag in container image repositories, so I suggest adding a check to display a warning if the user tries to use it.

$ crc setup -b docker://quay.io/crcont/openshift-bundle:latest
WARN 'latest' tag is not supported; use a specific version

This could also be converted to an error, but I think that is too restrictive to the user.

redbeam avatar Dec 18 '24 09:12 redbeam

This could also be converted to an error, but I think that is too restrictive to the user.

yes, i also think it should be a warning

anjannath avatar May 26 '25 16:05 anjannath

so as of now it is

$ ./crc setup -b  docker://quay.io/crcont/microshift-bundle:latest
bundle filename is in unrecognized format

so you want to error message to be changed with 'latest' tag is not supported; use a specific version ?

praveenkumar avatar May 27 '25 07:05 praveenkumar

so you want to error message to be changed with 'latest' tag is not supported; use a specific version ?

Yes because the current message doesn't tell the user what is wrong.

redbeam avatar May 27 '25 09:05 redbeam

I actually realized returning an early error makes more sense, since a warning would lead to an error anyway (later checks would fail).

So this is the behavior now:

$ crc setup -b docker://quay.io/crcont/openshift-bundle
ERRO No tag found in bundle URI

$ crc setup -b docker://quay.io/crcont/openshift-bundle:
ERRO No tag found in bundle URI

$ crc setup -b docker://quay.io/crcont/openshift-bundle:latest
ERRO 'latest' tag is not supported; use a specific version

redbeam avatar Jul 03 '25 15:07 redbeam