opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

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

Open mx-psi opened this issue 1 year ago • 10 comments

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 https://github.com/open-telemetry/opentelemetry-collector/issues/8210.

This is blocked by https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/25116

mx-psi avatar Aug 09 '23 15:08 mx-psi

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

bryan-aguilar avatar Aug 11 '23 00:08 bryan-aguilar

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

mx-psi avatar Aug 11 '23 07:08 mx-psi

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

shivanshuraj1333 avatar Aug 11 '23 08:08 shivanshuraj1333

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

gord02 avatar Aug 30 '23 17:08 gord02

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 https://github.com/open-telemetry/opentelemetry-collector/pull/8225#discussion_r1302127905 when making a PR: if replacing multierr.Append prefer appending to a slice and then using errors.Join on the slice!

mx-psi avatar Aug 31 '23 08:08 mx-psi

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

bagmeg avatar Oct 14 '23 07:10 bagmeg

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

mx-psi avatar Oct 16 '23 09:10 mx-psi

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.

github-actions[bot] avatar Feb 12 '24 03:02 github-actions[bot]

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

argonavist avatar May 07 '24 17:05 argonavist

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

bryan-aguilar avatar May 07 '24 17:05 bryan-aguilar

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.

github-actions[bot] avatar Jul 08 '24 03:07 github-actions[bot]

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

github-actions[bot] avatar Sep 06 '24 05:09 github-actions[bot]