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

Remove deprecated errors package #261

Closed
wants to merge 1 commit into from

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Feb 8, 2025

The github.com/pkg/errors errors package is deprecated and the project is archived. Replace use with Go standard library errors and fmt versions.

  • Make k8s.io errors package aliases consistent.

@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: SuperQ
To complete the pull request process, please assign haorenfsa after the PR has been reviewed.
You can assign the PR to them by writing /assign @haorenfsa in a comment when ready.

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

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

The `github.com/pkg/errors` errors package is deprecated and the
project is archived. Replace use with Go standard library `errors`
and `fmt` versions.
* Make `k8s.io` errors package aliases consistent.

Signed-off-by: SuperQ <[email protected]>
@SuperQ
Copy link
Contributor Author

SuperQ commented Feb 8, 2025

This is going to take some work to refactor a few tests.

@haorenfsa
Copy link
Collaborator

@SuperQ Oh, wait. Let's first discuss about it before making these changes.

I don't think fmt.Errorf could replace github.com/pkg/errors.Wrap. It lacks the call stack trace, which is crucial under most circumstances.

@SuperQ
Copy link
Contributor Author

SuperQ commented Feb 10, 2025

It doesn't exactly, but the Go developers have decided against errors.Wrap(). The package is archived and receiving no support.

The new stdlib errors packages needs to be used.

@haorenfsa
Copy link
Collaborator

@SuperQ We feel that the standard library is still not enough. Let's use this library as milvus repo does https://github.com/cockroachdb/errors. This way the API is also compatible.

@SuperQ
Copy link
Contributor Author

SuperQ commented Feb 10, 2025

I'll leave that up to other people if they're interested.

@SuperQ SuperQ closed this Feb 10, 2025
@SuperQ SuperQ deleted the superq/errors branch February 10, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants