crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 242 forks source link

update bundle check to consider release candidate versions to be valid #4409

Closed anjannath closed 2 weeks ago

anjannath commented 1 month ago

Currently the bundle check considers the following bundle name as invalid crc_libvirt_4.18.0-ec.2_amd64.pr980.crcbundle, it expects the version to be x.y.z without containing the -ec.2 part and the suffix pr980 should have the separator _ instead of a .

the CI on snc [0] is failing due to this strict checking, i think we can update the validation check to allow the version formats x.y.z-rc.1

[0] https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/crc-org_snc/980/pull-ci-crc-org-snc-master-e2e-snc/1848580407633645568

praveenkumar commented 1 month ago

I think it is happen because of recent work @redbeam did around validation. @redbeam can you please take a look into this ?

redbeam commented 1 month ago

@praveenkumar @anjannath We can modify the regex to allow additional characters in the version specification. But I'm not sure how to interpret the suffix - currently there is the CustomBundleSuffix that accepts just numbers. Is the pr980 something different than the existing suffix? Or is it just a variant of it?

praveenkumar commented 1 month ago

@redbeam this is something different which is used as part of CI bits so we need to modify the regex to allow that also -ec.2 or -rc.0 can be part of bundle string.

redbeam commented 1 month ago

@praveenkumar But what about the suffix? What does pr980 mean in this context?

anjannath commented 4 weeks ago

@praveenkumar But what about the suffix? What does pr980 mean in this context?

pr980 is also the custom suffix, the CI job is just adding the pull request number at the end of pr, so we could modify the regex to accept alphanumeric for the custom suffix instead of just numbers, or we could instead update the snc job to create the custom suffix containing only numbers

and the separator between the bundle name and the custom suffix is currently a . while the regex expects it to be a _ for this i think best to update the job on the snc side, here: https://github.com/crc-org/snc/blob/b4d9754b20d5636d62eea2c43e42100403048ce0/createdisk-library.sh#L9

praveenkumar commented 4 weeks ago

We can remove pr from the suffix and have only the number with use of _ but we still need to update our version regex to make sure it accepts ec, alpha , rc ..etc.

redbeam commented 4 weeks ago

@anjannath Updating the job on snc side would be fine, but if there are any other places that could put their own suffix, maybe then we should change the regex.

@praveenkumar I will submit a PR with this change.

praveenkumar commented 4 weeks ago

from snc side https://github.com/crc-org/snc/pull/982 is created to take care of .pr<pr_number>

redbeam commented 2 weeks ago

fixed in #4413