crc
crc copied to clipboard
Show a warning when using `latest` tag
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.
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
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 ?
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.
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