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

[confmap] Add ability to set default provider #10182

Merged
merged 22 commits into from
May 29, 2024

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented May 20, 2024

Description

This PR adds support for expanding ${} syntax when no schema is provided by allowing Resolver to use a default provider.

In a followup PR I'll update otelcol with a feature gate that allow switching between a default envProvider and the expandconverter.

Link to tracking issue

Related to #10161
Related to #7111

Testing

Added unit tests

Documentation

Added godoc strings

@TylerHelmuth TylerHelmuth requested a review from a team as a code owner May 20, 2024 21:50
Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.46%. Comparing base (31ac333) to head (68de2db).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10182   +/-   ##
=======================================
  Coverage   92.46%   92.46%           
=======================================
  Files         387      387           
  Lines       18246    18264   +18     
=======================================
+ Hits        16871    16888   +17     
- Misses       1028     1029    +1     
  Partials      347      347           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.chloggen/confmap-default-provider.yaml Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
.chloggen/confmap-default-provider.yaml Outdated Show resolved Hide resolved
confmap/resolver.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
confmap/resolver.go Outdated Show resolved Hide resolved
confmap/resolver.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
confmap/expand.go Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
codeboten pushed a commit that referenced this pull request May 28, 2024
#### Description
Add a new test scenarios to confmap expand tests

#### Link to tracking issue
Related to
#10182 (comment)
confmap/expand.go Outdated Show resolved Hide resolved
confmap/expand.go Outdated Show resolved Hide resolved
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Looks good to me, I like the implementation approach we ended up on.

confmap/expand_test.go Show resolved Hide resolved
confmap/resolver.go Outdated Show resolved Hide resolved
confmap/resolver.go Outdated Show resolved Hide resolved
TylerHelmuth and others added 2 commits May 29, 2024 16:19
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
@codeboten codeboten merged commit eaab76e into open-telemetry:main May 29, 2024
48 checks passed
@github-actions github-actions bot added this to the next release milestone May 29, 2024
@TylerHelmuth TylerHelmuth deleted the confmap-default-provider branch May 29, 2024 22:51
steves-canva pushed a commit to Canva/opentelemetry-collector that referenced this pull request Jun 14, 2024
#### Description
Add a new test scenarios to confmap expand tests

#### Link to tracking issue
Related to
open-telemetry#10182 (comment)
steves-canva pushed a commit to Canva/opentelemetry-collector that referenced this pull request Jun 14, 2024
#### Description
This PR adds support for expanding `${}` syntax when no schema is
provided by allowing Resolver to use a default provider.

In a followup PR I'll update otelcol with a feature gate that allow
switching between a default envProvider and the expandconverter.

#### Link to tracking issue
Related to
open-telemetry#10161
Related to
open-telemetry#7111

#### Testing
Added unit tests

#### Documentation
Added godoc strings

---------

Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.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.

None yet

5 participants