operator-framework / operator-courier

Build, verify and push operators
Apache License 2.0
41 stars 53 forks source link

Validate version must be the first item of versions #177

Open clyang82 opened 4 years ago

clyang82 commented 4 years ago

Signed-off-by: Chun Lin Yang clyang@cn.ibm.com

apiextensions.k8s.io/v1beta1, there was a version field instead of versions. The version field is deprecated and optional, but if it is not empty, it must match the first item in the versions field.

This PR is to validate this case.

openshift-ci-robot commented 4 years ago

Hi @clyang82. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
clyang82 commented 4 years ago

/assign @kevinrizza

kevinrizza commented 4 years ago

@clyang82 This pr seems great! Thanks for the contribution. However, fyi we are trying to avoid updating and releasing this project if at all possible given the operator-framework's efforts to deprecate and replace all of our use of app-registry -- so while this pr may merge we may not cut a release for this anytime soon. Is this something you are looking to actively validate?

If you're just looking to contribute to a validation project in the operator-framework, this project aims to replace most of the operator-courier verify functionality once app-registry is deprecated: https://github.com/operator-framework/api/tree/master/pkg/validation

/lgtm /approve

kevinrizza commented 4 years ago

/ok-to-test

openshift-ci-robot commented 4 years ago

New changes are detected. LGTM label has been removed.

clyang82 commented 4 years ago

@kevinrizza Thanks for your information. That is OK. I do not have urgent business requirement to do validation. I just found that the yaml file did not work after pass the courier validation. If you think the PR is ok to merge, then just merge it. Thanks.

I will take a look at https://github.com/operator-framework/api/tree/master/pkg/validation

kevinrizza commented 4 years ago

@clyang82 Please take a look at these enhancements for more details:

https://github.com/openshift/enhancements/blob/master/enhancements/olm/operator-registry.md https://github.com/openshift/enhancements/blob/master/enhancements/olm/operator-bundle.md

Essentially we are proposing the use of container image registries as storage to host operator bundles and registry index images.

openshift-ci-robot commented 3 years ago

@clyang82: PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
euld1984 commented 1 year ago

The statement "Validate version must be the first item of versions" suggests that when listing out different versions of something, the first item in the list should always be the validated version. This may be important in certain contexts where the order of versions matters, such as in software development where version control is crucial. By placing the validated version first in the list, it helps ensure that it is the most current and reliable version being used.