Skip to content

libpod/runtime: switch to golang native error wrapping#14789

Merged
openshift-ci[bot] merged 1 commit intocontainers:mainfrom
saschagrunert:libpod-errors
Jul 5, 2022
Merged

libpod/runtime: switch to golang native error wrapping#14789
openshift-ci[bot] merged 1 commit intocontainers:mainfrom
saschagrunert:libpod-errors

Conversation

@saschagrunert
Copy link
Copy Markdown
Member

@saschagrunert saschagrunert commented Jun 30, 2022

We now use the golang error wrapping format specifier %w instead of the deprecated github.com/pkg/errors package.

Part of #14784

Does this PR introduce a user-facing change?

None

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Jun 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 30, 2022
@saschagrunert saschagrunert force-pushed the libpod-errors branch 10 times, most recently from 792697f to 8951be1 Compare July 4, 2022 06:49
@saschagrunert
Copy link
Copy Markdown
Member Author

I try to keep those PRs smaller to reduce the risk.

@saschagrunert saschagrunert changed the title libpod: switch to golang native error wrapping libpod/runtime: switch to golang native error wrapping Jul 4, 2022
@saschagrunert saschagrunert force-pushed the libpod-errors branch 7 times, most recently from 27d6d91 to 48910c3 Compare July 4, 2022 11:55
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Copy Markdown
Member Author

CI should be green. PTAL @containers/podman-maintainers

Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold
Thanks, Sascha!

func Cause(err error) (cause error) {
cause = err

const maxDepth = 100
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since memory is finite, I don't think we can run into endless loops/wrap an error indefinite times. But if an error was wrapped more than 100 times I see value in warning about it.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 4, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2022
@vrothberg
Copy link
Copy Markdown
Member

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 5, 2022
@openshift-ci openshift-ci bot merged commit 773eead into containers:main Jul 5, 2022
@saschagrunert saschagrunert deleted the libpod-errors branch July 5, 2022 07:25
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants