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

Use Go 1.20 errors.Join instead of go.uber.org/multierr #25121

Closed
mx-psi opened this issue Aug 9, 2023 · 12 comments
Closed

Use Go 1.20 errors.Join instead of go.uber.org/multierr #25121

mx-psi opened this issue Aug 9, 2023 · 12 comments
Assignees
Labels
ci-cd CI, CD, testing, build issues closed as inactive Contribfest enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority:p2 Medium Stale

Comments

@mx-psi
Copy link
Member

mx-psi commented Aug 9, 2023

Component(s)

No response

Describe the issue you're reporting

Go 1.20 includes new builtin error joining support that can replace the usage of go.uber.org/multierr. We should switch to using these and ban the usage of go.uber.org/multierr via depguard (same as this).

Counterpart of open-telemetry/opentelemetry-collector#8210.

This is blocked by #25116

@mx-psi mx-psi added enhancement New feature or request good first issue Good for newcomers priority:p2 Medium ci-cd CI, CD, testing, build issues on hold This is blocked by another PR/issue labels Aug 9, 2023
@bryan-aguilar
Copy link
Contributor

Would we prefer to see this per component or one big search and replace PR?

@mx-psi
Copy link
Member Author

mx-psi commented Aug 11, 2023

Would we prefer to see this per component or one big search and replace PR?

I guess it is up to whoever takes this, my experience is that per component (or at least not everything at once) is a bit less frustrating for contributors given the churn of conflicts

@shivanshuraj1333
Copy link
Member

shivanshuraj1333 commented Aug 11, 2023

I can work on this, @mx-psi kindly assign, would do once the blocker PR is merged.

@gord02
Copy link
Contributor

gord02 commented Aug 30, 2023

Hello everyone. Are there any other components that need to migrate over to the new built-in error support?

@mx-psi mx-psi removed the on hold This is blocked by another PR/issue label Aug 31, 2023
@mx-psi
Copy link
Member Author

mx-psi commented Aug 31, 2023

Hey @gord02! There are still components that you can migrate, I think e.g. @shivanshu1333 has not gotten started with processors and most exporters are not done either.

Please see open-telemetry/opentelemetry-collector#8225 (comment) when making a PR: if replacing multierr.Append prefer appending to a slice and then using errors.Join on the slice!

@bagmeg
Copy link
Contributor

bagmeg commented Oct 14, 2023

Hi I'm interested in working on it. Can i work on it?

@mx-psi
Copy link
Member Author

mx-psi commented Oct 16, 2023

Sure, feel free to open a PR @bagmeg :)

dmitryax pushed a commit that referenced this issue Oct 19, 2023
…/multierr (#27835)

**Description:** fileexporter: use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** #25121
TylerHelmuth pushed a commit that referenced this issue Oct 19, 2023
….uber.org/multierr (#27857)

**Description:** 
use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** <Issue number if applicable>
#25121 

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
martin-majlis-s1 pushed a commit to scalyr/opentelemetry-collector-contrib that referenced this issue Oct 20, 2023
…/multierr (open-telemetry#27835)

**Description:** fileexporter: use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** open-telemetry#25121
martin-majlis-s1 pushed a commit to scalyr/opentelemetry-collector-contrib that referenced this issue Oct 20, 2023
….uber.org/multierr (open-telemetry#27857)

**Description:** 
use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#25121 

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
mx-psi pushed a commit that referenced this issue Oct 23, 2023
…org/multierr (#27888)

**Description:** 
use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** <Issue number if applicable>
#25121 

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
@github-actions github-actions bot added the Stale label Feb 12, 2024
@frzifus frzifus removed the Stale label Mar 14, 2024
codeboten pushed a commit that referenced this issue Mar 15, 2024
dmitryax pushed a commit that referenced this issue Mar 15, 2024
jpkrohling added a commit that referenced this issue May 7, 2024
…org/multierr (#32509)

**Description:** <Describe what has changed.>
use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** <Issue number if applicable>
#25121 

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

Co-authored-by: Juraci Paixão Kröhling <[email protected]>
@argonavist
Copy link
Contributor

Hi I'm interested in helping with this, may I?

@bryan-aguilar
Copy link
Contributor

Feel free to send PRs for components which are still using multierr to join errors.

andrzej-stencel pushed a commit that referenced this issue May 8, 2024
…ierr (#32925)

**Description:** 
syslogexporter: use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** 

[#25121](#25121)

**Testing:** 

**Documentation:**
codeboten pushed a commit that referenced this issue May 14, 2024
…rg/multierr (#32979)

chronyreceiver: use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** 

[#25121](#25121)
andrzej-stencel pushed a commit that referenced this issue May 16, 2024
…33052)

**Description:** <Describe what has changed.>
Replace multierr in favor of errors.Join

**Link to tracking Issue:** 

#25121

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
Copy link
Contributor

github-actions bot commented Jul 8, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Copy link
Contributor

github-actions bot commented Sep 6, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
@bagmeg bagmeg removed their assignment Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI, CD, testing, build issues closed as inactive Contribfest enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed priority:p2 Medium Stale
Projects
None yet
Development

No branches or pull requests

8 participants