Skip to content

estargz: deprecate errorutil in favor of native errors.Join#2247

Open
thaJeztah wants to merge 1 commit intocontainerd:mainfrom
thaJeztah:native_multierror
Open

estargz: deprecate errorutil in favor of native errors.Join#2247
thaJeztah wants to merge 1 commit intocontainerd:mainfrom
thaJeztah:native_multierror

Conversation

@thaJeztah
Copy link
Member

Commit cf6d7a0 introduced this package as a replacement for github.com/hashicorp/go-multierror. Now that Go stdlib provides native support for multi-errors through errors.Join, we can deprecated the utility, and use stdlib errors instead. Using errors.Join will produce a slightly different formatting, but should still capture the same information.

There do not appear to be external consumers of this package, other than through vendoring, so we could decide to remove the package entirely; https://grep.app/search?f.lang=Go&q=estargz%2Ferrorutil


// Aggregate combines a list of errors into a single new error.
//
// Deprecated: use [errors.Join] instead. This package will be removed in v0.19.0
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @ktock I put v0.19.0 here, but can either remove that, or adjust to what makes sense.

@thaJeztah
Copy link
Member Author

Failure looks unrelated;

++ VERSION_ROOT=v0.15.0
++ VERSION_HELM_JOB=v0.9.14-build20260210
+++ curl -sL https://raw.githubusercontent.com/k3s-io/kubernetes/refs/tags/v1.35.1-k3s1/.go-version
++ VERSION_GOLANG=go1.25.6
++ [[ -n v1.35.0-k3s1 ]]
++ [[ ! v1.35.0-k3s1 =~ ^v1\.35\.1[+-] ]]
++ echo 'Tagged version '\''v1.35.0-k3s1'\'' does not match expected version '\''v1.35.1[+-]*'\'''
Tagged version 'v1.35.0-k3s1' does not match expected version 'v1.35.1[+-]*'
++ exit 1

Copy link
Member

@ktock ktock left a comment

Choose a reason for hiding this comment

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

Thanks, I've just fixed the CI failure, could you rebase the PR?

Commit cf6d7a0 introduced this package
as a replacement for `github.com/hashicorp/go-multierror`. Now that
Go stdlib provides native support for multi-errors through errors.Join,
we can deprecated the utility, and use stdlib errors instead. Using
errors.Join will produce a slightly different formatting, but should
still capture the same information.

There do not appear to be external consumers of this package, other than
through vendoring, so we could decide to remove the package entirely;
https://grep.app/search?f.lang=Go&q=estargz%2Ferrorutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Thx! Rebased 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants