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

Deprecate all types and funcs in config package #6422

Merged
merged 3 commits into from
Nov 5, 2022

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Oct 27, 2022

The main reason is to remove the circular dependency between the config (including sub-packages) and component. Here is the current state:

  • component depends on config
  • config/sub-package[grpc, http, etc.] depends on config & component

Because of this "circular" dependency, we cannot split for example "config" into its own module, only if all the other config sub-packages are also split.

config.Type => component.Type
config.DataType => component.DataType
config.Receiver => component.ReceiverConfig
config.Processor => component.ProcessorConfig
config.Exporter => component.ExporterConfig
config.Extension => component.ExtensionConfig

Updates #6187

@bogdandrutu bogdandrutu marked this pull request as ready for review October 27, 2022 19:18
@bogdandrutu bogdandrutu requested review from a team and mx-psi October 27, 2022 19:18
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Base: 91.64% // Head: 91.86% // Increases project coverage by +0.22% 🎉

Coverage data is based on head (0d78abd) compared to base (6b27644).
Patch coverage: 98.82% of modified lines in pull request are covered.

❗ Current head 0d78abd differs from pull request most recent head 74e53c9. Consider uploading reports for the commit 74e53c9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6422      +/-   ##
==========================================
+ Coverage   91.64%   91.86%   +0.22%     
==========================================
  Files         238      238              
  Lines       13811    13616     -195     
==========================================
- Hits        12657    12509     -148     
+ Misses        924      878      -46     
+ Partials      230      229       -1     
Impacted Files Coverage Δ
component/config.go 40.00% <ø> (ø)
config/moved_config.go 0.00% <0.00%> (ø)
exporter/loggingexporter/config.go 64.51% <ø> (ø)
exporter/otlpexporter/config.go 0.00% <ø> (ø)
exporter/otlphttpexporter/config.go 80.00% <ø> (ø)
extension/experimental/storage/storage.go 100.00% <ø> (ø)
extension/zpagesextension/config.go 0.00% <ø> (ø)
obsreport/obsreport_processor.go 94.69% <ø> (ø)
processor/batchprocessor/config.go 100.00% <ø> (ø)
processor/memorylimiterprocessor/config.go 0.00% <ø> (ø)
... and 79 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.

@bogdandrutu bogdandrutu force-pushed the deprecateallconfig branch 3 times, most recently from 6f2fe5e to bee1ea8 Compare October 27, 2022 20:45
@bogdandrutu
Copy link
Member Author

/cc @dmitryax since I remember you also mentioned this to me

@dmitryax
Copy link
Member

This seems like a good solution to me. I was thinking about taking a similar approach.

.chloggen/deprecateallconfig.yaml Outdated Show resolved Hide resolved
config/moved_config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Still working through reviewing the changes, overall i think this makes sense. Will this change (once the deprecated funcs are removed) completely decouple config from component?

.chloggen/deprecateallconfig.yaml Outdated Show resolved Hide resolved
@bogdandrutu
Copy link
Member Author

@codeboten @dmitryax PTAL

@bogdandrutu bogdandrutu force-pushed the deprecateallconfig branch 4 times, most recently from 0e5bded to 0a8f738 Compare November 1, 2022 22:24
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.

Overall LGTM

Please rebase

.chloggen/deprecateallconfig.yaml Show resolved Hide resolved
@bogdandrutu bogdandrutu force-pushed the deprecateallconfig branch 2 times, most recently from 798755c to 7ef05a3 Compare November 1, 2022 22:50
@bogdandrutu
Copy link
Member Author

Please rebase

Done.

The main reason is to remove the circular dependency between the config (including sub-packages) and component. Here is the current state:
* component depends on config
* config/sub-package[grpc, http, etc.] depends on config & component

Because of this "circular" dependency, we cannot split for example "config" into its own module, only if all the other config sub-packages are also split.

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu merged commit cece58f into open-telemetry:main Nov 5, 2022
@bogdandrutu bogdandrutu deleted the deprecateallconfig branch November 5, 2022 18:10
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