-
Notifications
You must be signed in to change notification settings - Fork 78
validation: bundle CRDs are compared by definition key instead of name #32
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
validation: bundle CRDs are compared by definition key instead of name #32
Conversation
Looking good but hold for now. |
/lgtm |
if len(crd.Spec.Versions) == 0 { | ||
// Skip group, which CSVs do not support. | ||
key := registry.DefinitionKey{ | ||
Name: crd.GetName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our work adding v1 crds to bundles is going to break this - instead of returning a *v1beta1.CustomResourceDefinition
we are returning an interface now. We started addressing this in https://github.com/operator-framework/api/pull/29/files#diff-8a818e661938b6d25ef2013d1289f89cR94
but I believe we are planning to move this code back into the registry instead - right @dinhxuanvu?
See operator-framework/operator-registry#295 for the PR with the breaking change. we are planning to merge this one this week.
We can merge as-is and then fix it in a follow-up, or hold off on this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is meant to fix api as it is. We will address the v1 CRD support in subsequent PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds good
/lgtm |
/lgtm |
validation: bundle CRDs are compared by definition key instead of name (#32)
CRDs should not be compared by name because each CSV
customresourcedefinition
element is not unique by name only, i.e. multiple versions of the same CRD are allowed.Also fixed a test comparison (wrong argument order).
/kind bug
/cc @dinhxuanvu @kevinrizza