-
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
convert CLI to use generated clients #16603
convert CLI to use generated clients #16603
Conversation
7133384
to
35f3000
Compare
c.ImageStreamByAnnotationSearcher = app.NewImageStreamByAnnotationSearcher(osclient, osclient, namespaces) | ||
c.ImageStreamByAnnotationSearcher = app.NewImageStreamByAnnotationSearcher( | ||
c.ImageClient, | ||
c.ImageClient, |
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.
I'm not sure I wanna ask, but srsly? We need twice the same thing?
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.
I'm not sure I wanna ask, but srsly? We need twice the same thing?
two different interfaces for getters.
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.
Leave a TODO here to fix this.
) | ||
|
||
// ImageStreamSearcher searches the openshift server image streams for images matching a particular name | ||
type ImageStreamSearcher struct { | ||
Client client.ImageStreamsNamespacer | ||
ImageStreamImages client.ImageStreamImagesNamespacer | ||
Client imageclient.ImageStreamsGetter |
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.
We should probably rename them to reflect what this client is.
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.
We should probably rename them to reflect what this client is.
follow. We're stacked up and these pulls conflict like crazy.
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.
Leave a TODO here to fix this.
/approve |
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.
/lgtm
All the rest can be addressed post-merge.
c.ImageStreamByAnnotationSearcher = app.NewImageStreamByAnnotationSearcher(osclient, osclient, namespaces) | ||
c.ImageStreamByAnnotationSearcher = app.NewImageStreamByAnnotationSearcher( | ||
c.ImageClient, | ||
c.ImageClient, |
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.
Leave a TODO here to fix this.
if err != nil { | ||
return errors.NewError("cannot obtain API clients").WithCause(err).WithDetails(h.OriginLog()) |
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.
Are you sure you want to have less info in the returned error than before?
if err != nil { | ||
return err | ||
} | ||
config.SetOpenShiftClient(imageClient.Image(), templateClient.Template(), routeClient.Route(), namespace, dockerClient) |
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.
Leave a TODO to fix this, looks weird with the old name currently.
@@ -252,9 +252,7 @@ func TestUnprivilegedNewProjectDenied(t *testing.T) { | |||
} | |||
|
|||
valerieClientConfig.BearerToken = accessToken | |||
if err != nil { |
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.
Good catch 👍
@@ -232,18 +231,13 @@ func (cfg *Config) OpenShiftConfig() *restclient.Config { | |||
} | |||
|
|||
// Clients returns an OpenShift and a Kubernetes client from a given configuration | |||
func (cfg *Config) Clients() (osclient.Interface, kclientset.Interface, error) { | |||
func (cfg *Config) Clients() (kclientset.Interface, error) { |
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.
KubeClientset or alike
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, soltysh 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 |
Automatic merge from submit-queue (batch tested with PRs 16525, 16602, 16603). |
@soltysh so close!
This removes more legacy clients