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

Should consider using pkg/errors #717

Closed
shawn-hurley opened this issue Feb 1, 2018 · 6 comments
Closed

Should consider using pkg/errors #717

shawn-hurley opened this issue Feb 1, 2018 · 6 comments
Labels
feature lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. unplanned Issue is recognized but not planned for any release

Comments

@shawn-hurley
Copy link
Contributor

shawn-hurley commented Feb 1, 2018

We should consider using the errors package to wrap errors and keep the context of errors as they are bubbled up.

I would actually suggest moving to https://github.com/pkg/errors for this kind of thing. It is very useful. Has a method
errors.Wrap(err,"some additional context")
that returns an error. It also provides the benefit of providing stack traces when the errors are logged with %+v

@maleck13 suggested this while commenting on #716

I think a simple proposal of how this would be used, and how we would go about adding it to our codebase is something that should be considered.

@maleck13
Copy link
Contributor

maleck13 commented Feb 1, 2018

I have used this package many times. It has a small footprint but provides great value.

@eriknelson
Copy link
Contributor

I think a simple proposal of how this would be used, and how we would go about adding it to our codebase is something that should be considered.

Sounds good to me. I would prefer not to have to manually wrap errors all the time; some sugar to make this simple would be my desire.

Love the stack traces!

@rthallisey rthallisey added feature 3.10 | release-1.2 Kubernetes 1.10 | Openshift 3.10 | Broker release-1.2 labels Feb 1, 2018
@jmrodri jmrodri added 3.12 | release-1.4 Kubernetes 1.12 | Openshift 3.12 | Broker release-1.4 and removed 3.10 | release-1.2 Kubernetes 1.10 | Openshift 3.10 | Broker release-1.2 labels May 29, 2018
@jmrodri jmrodri added unplanned Issue is recognized but not planned for any release and removed 3.12 | release-1.4 Kubernetes 1.12 | Openshift 3.12 | Broker release-1.4 labels Nov 12, 2018
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 29, 2020
@jmrodri
Copy link
Contributor

jmrodri commented Sep 20, 2020

/close

@openshift-ci-robot
Copy link

@jmrodri: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jmrodri
Copy link
Contributor

jmrodri commented Sep 20, 2020

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. unplanned Issue is recognized but not planned for any release
Projects
None yet
Development

No branches or pull requests

7 participants