-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[v9] Move predicate err check earlier, inside RetryWithRelogin (#13368) #13747
Conversation
Fixes a bug in tsh ls resources, where users were prompted to re-login when it was only a predicate query error. `RetryWithRelogin` now aborts the re-login attempt if the error is of type predicate.
lib/client/api.go
Outdated
|
||
if utils.IsPredicateError(err) { | ||
return trace.Wrap(utils.PredicateError{Err: 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.
In v10, IsErrorResolvableWithRelogin
replaced the check on line 698, so I think it'd be more correct to move this predicate error check before line 698 to make it work just the same way as in v10.
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.
thank you for catching that, that would've been a bug
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.
Great catch Rafal!
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.
Leaving an approval so that I don't block you from merging.
Backport #13368 to branch/v9