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

Embed merge support into the default ConfigProvider. #4637

Merged
merged 1 commit into from Jan 6, 2022

Conversation

bogdandrutu
Copy link
Member

Depends on #4636

@bogdandrutu bogdandrutu requested a review from a team as a code owner January 5, 2022 02:20
@project-bot project-bot bot added this to In progress in Collector Jan 5, 2022
@codecov
Copy link

codecov bot commented Jan 5, 2022

Codecov Report

Merging #4637 (a81fdc3) into main (c76f0f4) will decrease coverage by 0.00%.
The diff coverage is 93.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4637      +/-   ##
==========================================
- Coverage   90.45%   90.44%   -0.01%     
==========================================
  Files         181      179       -2     
  Lines       10598    10594       -4     
==========================================
- Hits         9586     9582       -4     
  Misses        788      788              
  Partials      224      224              
Impacted Files Coverage Δ
service/config_provider.go 89.77% <93.18%> (+0.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c76f0f4...a81fdc3. Read the comment docs.

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.

I believe this change needs a Changelog line

// * Then applies all the ConfigMapConverterFunc in the given order.
// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler.
//
// This is a temporary API.
Copy link
Member

Choose a reason for hiding this comment

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

Can we add few words what to expect instead going forward?

Copy link
Member

Choose a reason for hiding this comment

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

Seconded. I think I would prefer to see this take functional options as it would allow for more flexibility in how the set of providers and converters are constructed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Even using "options" would not help me, since I will have to do the split of the ConfigUnmarshaler which will cause some breaking changes. Until that happens I prefer to mark this experimental to ensure the right expectations.

@rmfitzpatrick
Copy link
Contributor

Wanted to mention that this signature update will allow our downstream distribution to adopt the most recent core version after #4600 hid a number of our required helpers, leaving us in the position to have to port and shim them all. Would greatly appreciate it and #4636 landing.

// * Then applies all the ConfigMapConverterFunc in the given order.
// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler.
//
// This is a temporary API.
Copy link
Member

Choose a reason for hiding this comment

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

Seconded. I think I would prefer to see this take functional options as it would allow for more flexibility in how the set of providers and converters are constructed.

service/config_provider.go Show resolved Hide resolved
@bogdandrutu bogdandrutu force-pushed the rmmerge branch 2 times, most recently from 4106128 to 911a7de Compare January 6, 2022 00:47
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.

The code looks good to me.

I would still ask to put some info in Changelog, maybe mention these functions as replacement for removed configmapprovider.NewDefault, configmapprovider.NewExpand, configmapprovider.NewMerge in the same Breaking changes line.

Or at least mention this PR in #4600 's description

Collector automation moved this from In progress to Reviewer approved Jan 6, 2022
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu
Copy link
Member Author

@dmitryax done.

@bogdandrutu bogdandrutu merged commit 40a7d72 into open-telemetry:main Jan 6, 2022
Collector automation moved this from Reviewer approved to Done Jan 6, 2022
@bogdandrutu bogdandrutu deleted the rmmerge branch January 6, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants