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

feat!: Make IsAggregate work with Go-wrapped errors #97

Merged
merged 8 commits into from
Aug 4, 2023

Conversation

codingllama
Copy link
Contributor

@codingllama codingllama commented Aug 4, 2023

Originally missed from #95.

I've done a few other tweaks to existing code, but only is IsAggregate and Errors are visibly-changed (other methods may be slightly more performant).

I've also added "IsError" tests for aggregated errors and fixed an issue where our custom IsNotFound logic didn't call As(any) bool.

@codingllama
Copy link
Contributor Author

This should close the cycle on trace changes, after that we can tag the next version and update Teleport.

Are we OK bundling the behavioral changes here into v1.3.0, or would you rather tag v2?

@codingllama
Copy link
Contributor Author

Fixed an issue with (the original iteration of) edbc550, another issue with IsNotFound and added IsError tests for aggregates.

Comment on lines +808 to +810
assert.True(t, IsBadParameter(errAggregate), "IsBadParameter aggregate mismatch")
assert.True(t, IsNotFound(errAggregate), "IsNotFound aggregate mismatch")
assert.False(t, IsConnectionProblem(errAggregate), "IsConnectionProblem aggregate mismatch")
Copy link
Contributor

Choose a reason for hiding this comment

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

😲 🎉

@codingllama codingllama merged commit 1cff453 into master Aug 4, 2023
4 checks passed
@codingllama codingllama deleted the codingllama/aggregate branch August 4, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants