-
Notifications
You must be signed in to change notification settings - Fork 4.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
add legacy field selector for names #15963
add legacy field selector for names #15963
Conversation
/unassign |
b45f718
to
11c3dc9
Compare
@enj since you like removing boiilerplate |
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.
Sorry for all the duplicate comments- seems likely there's a single explanation for most of them but I wanted to make sure
oapi.GetFieldLabelConversionFunc(newer.DeploymentConfigToSelectableFields(&newer.DeploymentConfig{}), nil), | ||
); err != nil { | ||
return err | ||
} |
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.
Why is this required for buildconfigs but not here?
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 doesn't have a special case to map "name" to "metadata.name" for field selection.
); err != nil { | ||
return err | ||
} | ||
|
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.
Why is this required for buildconfigs but not here?
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.
doesn't have name -> metadata.name
); err != nil { | ||
return err | ||
} | ||
|
||
if err := scheme.AddFieldLabelConversionFunc("v1", "ImageStream", | ||
oapi.GetFieldLabelConversionFunc(newer.ImageStreamToSelectableFields(&newer.ImageStream{}), map[string]string{"name": "metadata.name"}), |
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.
Missing port to the new LegacyMetaV1FieldSelectorConversionWithName
?
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.
Missing port to the new LegacyMetaV1FieldSelectorConversionWithName?
didn't forget this one. This field selector actually lists many fields so the conversion can't be done via a straight default. It will require more thought and code.
); err != nil { | ||
return err | ||
} | ||
|
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.
Why is this required for buildconfigs but not here?
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.
doesn't do name->metadata.name
); err != nil { | ||
return err | ||
} | ||
|
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.
Why is this required for buildconfigs but not here?
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.
doesn't have name->metadata.name
oapi.GetFieldLabelConversionFunc(userapi.UserToSelectableFields(&userapi.User{}), nil), | ||
); err != nil { | ||
return err | ||
} |
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.
Why is this required for buildconfigs but not here?
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.
doesn't have name->metadata.name
That add/remove ratio... /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, ironcladlou The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
11c3dc9
to
b6b8323
Compare
b6b8323
to
d14cfb5
Compare
/retest |
1 similar comment
/retest |
Automatic merge from submit-queue (batch tested with PRs 15904, 15962, 15838, 15965, 15963) |
I think this gets me down the dozen or so "real" field selectors I need to convert for groupification.