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

Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings #6718

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Dec 9, 2022

Updates #4714

@bogdandrutu bogdandrutu requested review from a team and mx-psi December 9, 2022 01:22
@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Base: 89.48% // Head: 89.60% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (2bce1d3) compared to base (fdef8b1).
Patch coverage: 51.85% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6718      +/-   ##
==========================================
+ Coverage   89.48%   89.60%   +0.11%     
==========================================
  Files         245      245              
  Lines       14303    14272      -31     
==========================================
- Hits        12799    12788      -11     
+ Misses       1253     1231      -22     
- Partials      251      253       +2     
Impacted Files Coverage Δ
component/componenttest/nop_exporter.go 0.00% <0.00%> (ø)
component/componenttest/nop_extension.go 0.00% <0.00%> (ø)
component/componenttest/nop_processor.go 0.00% <0.00%> (ø)
component/componenttest/nop_receiver.go 0.00% <0.00%> (ø)
component/config.go 87.50% <ø> (ø)
config/connector.go 0.00% <0.00%> (-100.00%) ⬇️
config/exporter.go 0.00% <0.00%> (-100.00%) ⬇️
config/extension.go 0.00% <0.00%> (-100.00%) ⬇️
config/processor.go 0.00% <0.00%> (-100.00%) ⬇️
config/receiver.go 0.00% <0.00%> (-100.00%) ⬇️
... and 38 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ettings

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

Do we have an issue for the config package refactoring? It would be nice to provide reasoning for these changes. I can help with that if we don't have it.


privateConfig()
}
type Config interface{}
Copy link
Member

@dmitryax dmitryax Dec 11, 2022

Choose a reason for hiding this comment

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

// Config defines the configuration for a component.Component.

This description is probably not correct anymore, it can be applied to any configuration part now, not component.Component only, right?

Do you have any further plans for this type? Do we even need it if it's just interface{} now?

Also UnmarshalConfig doesn't seems to be applicable to compoonent module anymore. Do you think we should keep it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This description is probably not correct anymore, it can be applied to any configuration part now, not component.Component only, right?

Not sure I understand. The "component.Factory.CreateDefaultConfig" returns this object. If others are using it somewhere else that is their problem... What are you looking for here?

Do you have any further plans for this type? Do we even need it if it's just interface{} now?

Good discussion if we need it. We can think in a future PR about that.

Also UnmarshalConfig doesn't seems to be applicable to compoonent module anymore. Do you think we should keep it here?

Same as previous, we can followup with more changes, for the moment the purpose of #4714 was to make sure we don't mutate the Config and that becomes an opaque object from the core collector perspective.

Copy link
Member

@dmitryax dmitryax Dec 12, 2022

Choose a reason for hiding this comment

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

Not sure I understand. The "component.Factory.CreateDefaultConfig" returns this object. If others are using it somewhere else that is their problem... What are you looking for here?

Makes sense, so we still expect the Config to be mostly applied to Component even if it can be used with any other sub-configuration. That's what I was looking for

@bogdandrutu
Copy link
Member Author

bogdandrutu commented Dec 12, 2022

Do we have an issue for the config package refactoring? It would be nice to provide reasoning for these changes. I can help with that if we don't have it.

#4714

See the chloggen entry with breaking type

.chloggen/rmcfgid-1.yaml Outdated Show resolved Hide resolved
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
@bogdandrutu bogdandrutu merged commit 7cb2d76 into open-telemetry:main Dec 12, 2022
@bogdandrutu bogdandrutu deleted the rmcfgid branch December 12, 2022 22:35
jaronoff97 pushed a commit to lightstep/opentelemetry-collector that referenced this pull request Dec 14, 2022
…ettings (open-telemetry#6718)

* Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update .chloggen/rmcfgid-1.yaml

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
jaronoff97 pushed a commit to lightstep/opentelemetry-collector that referenced this pull request Dec 14, 2022
…ettings (open-telemetry#6718)

* Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update .chloggen/rmcfgid-1.yaml

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
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.

3 participants