-
Notifications
You must be signed in to change notification settings - Fork 592
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
refactor: Remove more calls to pkg errors #12683
Closed
MoritzThomasHuebner
wants to merge
9
commits into
magma:master
from
MoritzThomasHuebner:remove_more_calls_to_pkg_errors
Closed
refactor: Remove more calls to pkg errors #12683
MoritzThomasHuebner
wants to merge
9
commits into
magma:master
from
MoritzThomasHuebner:remove_more_calls_to_pkg_errors
Conversation
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
pull-request-size
bot
added
the
size/XXL
Denotes a Pull Request that changes 1000+ lines.
label
May 11, 2022
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
github-actions
bot
added
component: cwf
component: feg
FEG-gateway related issues
component: orc8r
Orchestrator-related issue
labels
May 11, 2022
Oops! Looks like you failed the Howto
♻️ Updated: ✅ The check is passing the Semantic PR after the last commit. |
MoritzThomasHuebner
force-pushed
the
remove_more_calls_to_pkg_errors
branch
from
May 11, 2022 07:30
303f5b0
to
99a408f
Compare
MoritzThomasHuebner
changed the title
Remove more calls to pkg errors
refactor: remove more calls to pkg errors
May 11, 2022
MoritzThomasHuebner
changed the title
refactor: remove more calls to pkg errors
refactor: Remove more calls to pkg errors
May 11, 2022
MoritzThomasHuebner
force-pushed
the
remove_more_calls_to_pkg_errors
branch
4 times, most recently
from
May 12, 2022 06:46
1a7de55
to
5ecc9d1
Compare
1 task
MoritzThomasHuebner
force-pushed
the
remove_more_calls_to_pkg_errors
branch
3 times, most recently
from
May 16, 2022 00:21
8c633c2
to
724a755
Compare
Also added back in a nil check in `collectGarbageSQL` in `orc8r/clound/go/syncstore/store_writer.go` Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Also added back in a nil check in `collectGarbageSQL` in `orc8r/clound/go/syncstore/store_writer.go` Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Also added back in a nil check in `collectGarbageSQL` in `orc8r/clound/go/syncstore/store_writer.go` Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
…errors" package Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
…kg/errors" as direct dependency. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Previously the error handling blocks used `err` instead of `commitErr`. This meant that `nil` was propagated up instead of the `commitErr`. Additionally, we now append the `rollbackErr` to the error, which not previously done. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
MoritzThomasHuebner
force-pushed
the
remove_more_calls_to_pkg_errors
branch
from
May 16, 2022 00:50
724a755
to
4d78312
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: cwf
component: feg
FEG-gateway related issues
component: orc8r
Orchestrator-related issue
size/XXL
Denotes a Pull Request that changes 1000+ lines.
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.
refactor: Remove more calls to pkg errors
Summary
Also contains the changes of #12682
Removes additional uses of "github.com/pkg/errors" so that it is no longer a dependency.
errors.WithStack(err)
witherr
errors.WithMessage(err, mess)
anderrors.WithMessagef(err, mess, ...var)
withfmt.Errorf(mess + ": %w", ...var, err)
errors.Cause
from "github.com/pkg/errors" witherrors.Unwrap
from GO "errors" packageerrors.New
This PR also reformats a few comment strings where they were not correctly formatted before. Additionally, the PR also rearranges some unrelated imports where they weren't following the correct convention before.
Test Plan
Run Unit tests.
Additional Information
This PR removes the dependency on "github.com/pkg/errors".