-
Notifications
You must be signed in to change notification settings - Fork 721
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
integrate error codes with pkg/errors to provide error tracing #1200
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
bc61230
add pkg/errors to Gopkg
gregwebs 7a5bbab
integrate with pkg/errors
gregwebs 4b604c5
Merge remote-tracking branch 'main/master' into gregwebs/error-code-t…
gregwebs 8a0ced9
fix comment spellings
gregwebs c3c9a11
search for the deepest available stack trace
gregwebs c4a46a3
re-use the existing StackTrace function
gregwebs 3c88460
only internal errors should show a stack trace
gregwebs 48e18df
Merge remote-tracking branch 'main/master' into gregwebs/error-code-t…
gregwebs acb0499
update documentation
gregwebs 4314b76
Merge branch 'master' into gregwebs/error-code-tracing
gregwebs 35dc1b0
Upgrade pkg/errors to latest pingcap/errors
gregwebs a4d546f
use stack code in pingcap/errors
gregwebs 70edcec
Merge branch 'master' into gregwebs/error-code-tracing
gregwebs ee73eb5
use errors.Unwrap
gregwebs b79940d
error grouping
gregwebs b026410
upgrade pingcap/errors
gregwebs ff5c090
use the latest from pingcap/errors
gregwebs 4d88fdf
Merge remote-tracking branch 'main/master' into gregwebs/error-code-t…
gregwebs 99af76d
bugfix
gregwebs dee08a8
update to latest pingcap/errors (docs update)
gregwebs 84a95c4
Merge remote-tracking branch 'main/master' into gregwebs/error-code-t…
gregwebs 71fd836
Merge remote-tracking branch 'main/master' into gregwebs/error-code-t…
gregwebs 64bcff4
vendor: errcode is now its own package
gregwebs 8fcb0b4
switch to separate package for errcode
gregwebs 55f3967
fix gofmt
gregwebs 6ef458d
Merge branch 'master' into gregwebs/error-code-tracing
gregwebs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
seem we have already used juju errors, conflicted?
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.
What is the conflict? Both packages work together fine by using the same
Causer
interface. The rest of the API is the same, but with slightly different names (but pkg/errors can record a stack trace). See:juju/errors
topkg/errors
pingcap/tidb#7151I am happy to send a PR to make the switch in PD when we are ready.
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.
@gregwebs
I suggest only using one errors, so it is better to remove juju at first.
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.
Okay, I can send a PR for that. Would you like to continue to review this PR in the mean time since that PR won't affect this one (other than both adding pkg/errors in Gopkg)?
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.
of course, we can go on
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.
#1210 is merged: we are now using pkg/errors