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

[v9] Move predicate err check earlier, inside RetryWithRelogin (#13368) #13747

Merged
merged 5 commits into from
Jun 24, 2022

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Jun 22, 2022

Backport #13368 to branch/v9

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.
@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Jun 22, 2022
Comment on lines 701 to 705

if utils.IsPredicateError(err) {
return trace.Wrap(utils.PredicateError{Err: err})
}

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great catch Rafal!

Copy link
Member

@ravicious ravicious left a 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.

@kimlisa kimlisa enabled auto-merge (squash) June 22, 2022 23:07
@kimlisa kimlisa disabled auto-merge June 22, 2022 23:07
@kimlisa kimlisa enabled auto-merge (squash) June 22, 2022 23:07
@kimlisa kimlisa disabled auto-merge June 24, 2022 20:33
@kimlisa kimlisa enabled auto-merge (squash) June 24, 2022 20:33
@kimlisa kimlisa merged commit d5dbeea into branch/v9 Jun 24, 2022
@kimlisa kimlisa deleted the lisa/v9/backport-fix-predicate-err-check branch June 24, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants