Skip to content
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

remove some dead code and add generated oauth clients #15965

Merged
merged 3 commits into from
Aug 26, 2017

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Aug 24, 2017

remove some dead code and add generated oauth clients.

@mfojtik We need the new clients to divorce ourselves from direct etcd access through the API server layers.

@ironcladlou ought to be pretty easy. I just wanted the easy/clean bit before I start with the harder swizzling.

@openshift-merge-robot openshift-merge-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-api-review labels Aug 24, 2017
@ironcladlou
Copy link
Contributor

Nothing stands out at me as wrong here.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2017
@@ -4,6 +4,9 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient
// +genclient:nonNamespaced
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deads2k does OAuthAccessToken implement full CRUD? I see this in legacy:

  Create(token *oauthapi.OAuthAccessToken) (*oauthapi.OAuthAccessToken, error)
  Get(name string, options metav1.GetOptions) (*oauthapi.OAuthAccessToken, error)
  List(opts metav1.ListOptions) (*oauthapi.OAuthAccessTokenList, error)
  Delete(name string) error

No watch, no patch, no update :-) (genclient:onlyVerbs=create,get,list,delete) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about the generator, thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But... why shouldn't full CRUD be supported?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ironcladlou in some resources methods were not implemented in rest (leading to 404 or worse)... maybe we should generate all verbs in client but it might be confusing to users (they use Patch() but always get 404 as it is not implemented...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ironcladlou also missing list will lead to broken informer/lister....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand what's broken about list... also, what's not covered by the generic registry implementation? Patch is the only thing I haven't found so far

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was wrong, oauth use generic storage as you noted and we got all verbs for free, so this is correct and the legacy client was left behind.

@mfojtik
Copy link
Contributor

mfojtik commented Aug 24, 2017

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2017
@mfojtik
Copy link
Contributor

mfojtik commented Aug 24, 2017

/lgtm

(oauth is now using generic storage which gives us all verbs for free, the legacy client was never updated to have them, so this is good thing).

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, ironcladlou, mfojtik

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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@mfojtik
Copy link
Contributor

mfojtik commented Aug 24, 2017

/test extended_networking_minimal

flake: #14385

@deads2k
Copy link
Contributor Author

deads2k commented Aug 24, 2017

/retest

1 similar comment
@deads2k
Copy link
Contributor Author

deads2k commented Aug 25, 2017

/retest

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 15904, 15962, 15838, 15965, 15963)

@openshift-merge-robot openshift-merge-robot merged commit 49aee96 into openshift:master Aug 26, 2017
@deads2k deads2k deleted the oauth-01-registry branch January 24, 2018 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-approved approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. needs-api-review size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants