-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
🐛 Fix item validation for unhashable markers #1080
🐛 Fix item validation for unhashable markers #1080
Conversation
Signed-off-by: Stefan Büringer buringerst@vmware.com
|
||
for markerName, markerValues := range markerSet { | ||
for _, markerValue := range markerValues { | ||
if schemaMarker, isSchemaMarker := markerValue.(SchemaMarker); isSchemaMarker { | ||
if strings.HasPrefix(markerName, crdmarkers.ValidationItemsPrefix) { | ||
itemsMarkers = append(itemsMarkers, schemaMarker) | ||
itemsMarkerNames[schemaMarker] = markerName |
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 line failed if a marker is unhashable (e.g. Enum)
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.
Thanks!
LGTM label has been added. Git tree hash: bbaf90701b62d2fd080364b56706b2309fcb3db0
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Stefan Büringer buringerst@vmware.com
Today items validation with unhasable markers is broken (e.g. enum).
Example:
Leads to the following error