operator-framework / operator-courier

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

Correctly validate crd.spec.versions #189

Closed tiraboschi closed 4 years ago

tiraboschi commented 4 years ago

Correctly validate crd.spec.versions

crd.spec.version got deprecated for crd.spec.versions but in this case we are going to access a list of dictionaries where the relevant value is in the name field.

Fix all the validations on spec.versions and add additional validations.

Fix also its test.

Signed-off-by: Simone Tiraboschi stirabos@redhat.com

Fixes: #188

openshift-ci-robot commented 4 years ago

Hi @tiraboschi. 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.
tiraboschi commented 4 years ago

/ok-to-test

openshift-ci-robot commented 4 years ago

@tiraboschi: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/operator-framework/operator-courier/pull/189#issuecomment-657804771): >/ok-to-test 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.
kevinrizza commented 4 years ago

/ok-to-test /approve /lgtm

openshift-ci-robot commented 4 years ago

New changes are detected. LGTM label has been removed.

gallettilance commented 4 years ago

/retest

huzefa51 commented 4 years ago

Hello, I am trying to push the manifest but getting below error.

ERROR: CSV.spec.crd.owned.version isnot in CRD.spec.versions list [manifests/myapp-operator.clusterserviceversion.yaml]

operator-courier --version

2.1.8

gallettilance commented 4 years ago

/retest

tiraboschi commented 4 years ago

/hold

tiraboschi commented 4 years ago

/unhold

tiraboschi commented 4 years ago

I updated https://github.com/tiraboschi/operator-courier/tree/fix_188 but strangely I still my latest changes here

jmazzitelli commented 4 years ago

I updated https://github.com/tiraboschi/operator-courier/tree/fix_188 but strangely I still my latest changes here

Github is having problems - I saw similar odd behavior in unrelated PRs - just have to wait for them to fix the infrastructure: https://www.githubstatus.com/

jhrozek commented 4 years ago

btw the patch works for me, thank you for the work!

dinhxuanvu commented 4 years ago

/retest

dmesser commented 4 years ago

/retest

gallettilance commented 4 years ago

/retest