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
oc/*: gracefully fail when user group is not configured #1585
oc/*: gracefully fail when user group is not configured #1585
Conversation
pkg/cli/admin/groups/sync/prune.go
Outdated
@@ -5,7 +5,9 @@ import ( | |||
"fmt" | |||
|
|||
"github.com/go-ldap/ldap/v3" | |||
ocmdhelpers "github.com/openshift/oc/pkg/helpers/cmd" |
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.
nit: should be in oc/pkg group with the end of imports
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.
Do you have an import formatter enabled on the repo? I think you (and anyone making PRs) would appreciate your preferences being automated so these kinds of comments don't need to happen. OpenShift has an import formatter that I've seen other repos use.
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.
@@ -68,7 +71,7 @@ func NewCmdWhoAmI(f kcmdutil.Factory, streams genericiooptions.IOStreams) *cobra | |||
Run: func(cmd *cobra.Command, args []string) { | |||
kcmdutil.CheckErr(o.Complete(f)) | |||
kcmdutil.CheckErr(o.Validate()) | |||
kcmdutil.CheckErr(o.Run()) | |||
ocmdhelpers.CheckOAuthDisabledErr(o.Run(), o.DiscoveryClient) |
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.
no need to add this check in here because we will support both cases(catch notfound error internally and use different endpoint)
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.
whoami should work with external OIDC
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.
For now, let's have it fail gracefully - when we're ready to have it work both ways, we can remove this.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
1a4165e
to
df2f47f
Compare
Thanks @stevekuznetsov /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, stevekuznetsov 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 |
@stevekuznetsov: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
All commands using the
userv1
clients should be wrapped now.Follow-ups: