-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make MakeFactoryMap generic and move to otelcol #12220
base: main
Are you sure you want to change the base?
Make MakeFactoryMap generic and move to otelcol #12220
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12220 +/- ##
==========================================
+ Coverage 91.23% 91.31% +0.08%
==========================================
Files 466 467 +1
Lines 25656 25721 +65
==========================================
+ Hits 23406 23486 +80
+ Misses 1837 1827 -10
+ Partials 413 408 -5 ☔ View full report in Codecov by Sentry. |
Hm, CI says Edit: The issue was that I was using a different version of Go from the CI, so the |
Okay I think we have an infinite loop of |
Description
At the moment,
receiver
,scraper
,processor
,exporter
, andextension
each have their own version of theMakeFactoryMap
function, which takes a list of Factories and returns it as a map, with the component name as the key (and an error if there is overlap). Because all versions are near-identical except for the Factory type used, and this function is only used in tests and in the code generated by OCB (components.go
), it was suggested to make it generic and move it to theotelcol
package.This PR does exactly that. The old
MakeFactoryMap
functions are deprecated (and may be removed alongside their tests in a future release). I also had to make a few other odd changes to fit the new dependency graph.Link to tracking issue
Resolves #12222