Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: Remove dependency on multierror #5275

Merged
merged 5 commits into from
Feb 2, 2025

Conversation

lukemassa
Copy link
Contributor

@lukemassa lukemassa commented Jan 25, 2025

what

Replace hashicorp's multierror with functionality from the standard library. Also in the edited files, mostly to prevent import naming collisions, replaced pkg/errors with stdlib errors

why

While investigating #5269, I found a number of the more complicated usages of pkg/errors were due to https://github.com/hashicorp/go-multierror.

Go 1.20 introduced errors.Join which essentially has the same functionality as multierror. Even hashicorp itself is working to switch to the stdlib: hashicorp/terraform-provider-aws#32140.

This also cleans up some awkward logic to smooth over the mixed use of standard errors and multierrors.

tests

Ran unit tests.

references

@lukemassa lukemassa requested review from a team as code owners January 25, 2025 21:31
@lukemassa lukemassa requested review from GenPage, nitrocode and X-Guardian and removed request for a team January 25, 2025 21:31
@dosubot dosubot bot added dependencies PRs that update a dependency file go Pull requests that update Go code labels Jan 25, 2025
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
@lukemassa lukemassa marked this pull request as draft January 25, 2025 21:35
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
@lukemassa lukemassa marked this pull request as ready for review February 1, 2025 19:13
Copy link
Contributor

@jamengual jamengual left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 1, 2025
@lukemassa
Copy link
Contributor Author

We believe there to be unrelated issues with the "synk" checks and are merging despite their failure.

@lukemassa lukemassa merged commit aa4a980 into runatlantis:main Feb 2, 2025
37 of 39 checks passed
bub3n pushed a commit to bub3n/atlantis that referenced this pull request Feb 3, 2025
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
Signed-off-by: Petr Bubenik <petr.bubenik@drmax.eu>
bub3n pushed a commit to bub3n/atlantis that referenced this pull request Feb 4, 2025
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
Signed-off-by: Petr Bubenik <petr.bubenik@drmax.eu>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dependencies PRs that update a dependency file go Pull requests that update Go code lgtm This PR has been approved by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants