-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
olm-spec-descriptors test validates alm-examples with the incorrect CRD #6781
Labels
language/go
Issue is related to a Go operator project
Comments
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Solves operator-framework#6781. An additional condition is included for matching apiVersion when searching for the matching CRD in the CSV. This ensures the correct CRD versionis selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Solves operator-framework#6781. An additional condition is included for matching apiVersion when searching for the matching CRD in the CSV. This ensures the correct CRD version is selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Closes operator-framework#6781. An additional condition is included for matching apiVersion when searching for the matching CRD in the CSV. This ensures the correct CRD version is selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Closes operator-framework#6781. An additional condition is included for matching apiVersion when searching for the matching CRD in the CSV. This ensures the correct CRD version is selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Closes operator-framework#6781. An additional condition is included for matching apiVersion when searching for the matching CRD in the CSV. This ensures the correct CRD version is selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
Closes operator-framework#6781. An additional condition is included for matching `apiVersion` of example CRs with CRD `version` when searching for the CRD in the CSV. This ensures the correct CRD version is selected for validations. Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Jul 15, 2024
An additional condition is included for matching `apiVersion` of example CRs with CRD `version` when searching for the CRD in the CSV. This ensures the correct CRD version is selected for validations. Closes operator-framework#6781 Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
2 tasks
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Aug 15, 2024
An additional condition is included for matching `apiVersion` of example CRs with CRD `version` when searching for the CRD in the CSV. This ensures the correct CRD version is selected for validations. Closes operator-framework#6781 Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
openshift-ci
bot
added
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 8, 2024
/remove-lifecycle stale |
openshift-ci
bot
removed
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 8, 2024
tthvo
added a commit
to tthvo/operator-sdk
that referenced
this issue
Oct 15, 2024
An additional condition is included for matching `apiVersion` of example CRs with CRD `version` when searching for the CRD in the CSV. This ensures the correct CRD version is selected for validations. Closes operator-framework#6781 Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
What did you do?
Recently, the Cryostat Operator added another version to its existing CRD (i.e.
v1beta1
andv1beta2
). This version include breaking changes.In the
alm-examples
annotation, we include examples for both versions. We then ran the scorecard tests for the operator, including built-in tests and custom ones, but encountered unexpected test failures. See below.What did you expect to see?
The
olm-spec-descriptors
test to succeed.What did you see instead? Under which circumstances?
When the built-in olm scorecard tests are run, the following issues occur:
Reference: cryostatio/cryostat-operator#865 (comment)
Environment
Operator type:
/language go
Kubernetes cluster type:
$ operator-sdk version
$ go version
(if language is Go)$ kubectl version
Possible Solution
Internally, the scorecard will find the FIRST matching (by kind) owned CRD in the CSV to validate the CR in
alm-example
annotation.operator-sdk/internal/scorecard/tests/olm.go
Lines 280 to 319 in 0d54bbd
This means both versions in
alm-examples
are validated against the first CRD def. In this case, it isv1beta2
, which does not haveminimal
spec descriptor.The solution is to also include an additional condition for
apiVersion
when searching for the matching CRD in the CSV.Additional context
cryostatio/cryostat-operator#865
The text was updated successfully, but these errors were encountered: