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

Make the option WithErrorUnused enabled by default when unmarshaling configuration #9154

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Dec 20, 2023

Description:
Make the option WithErrorUnused enabled by default when unmarshaling configuration
The option WithErrorUnused is now enabled by default, and a new option WithIgnoreUnused is introduced to ignore
errors about unused fields.

Link to tracking Issue:
This relates to #7102 to some extent.

Testing:
N/A

Documentation:
N/A

@atoulme atoulme requested review from a team and bogdandrutu December 20, 2023 02:33
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3cccc1b) 91.47% compared to head (7c8864a) 91.39%.
Report is 10 commits behind head on main.

Files Patch % Lines
confmap/confmap.go 66.66% 2 Missing ⚠️
component/config.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9154      +/-   ##
==========================================
- Coverage   91.47%   91.39%   -0.09%     
==========================================
  Files         320      320              
  Lines       17187    17191       +4     
==========================================
- Hits        15722    15711      -11     
- Misses       1165     1177      +12     
- Partials      300      303       +3     

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

@bogdandrutu bogdandrutu merged commit 6155cc2 into open-telemetry:main Dec 22, 2023
31 of 32 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 22, 2023
codeboten pushed a commit to codeboten/opentelemetry-collector that referenced this pull request Jan 9, 2024
…arshaling configuration (open-telemetry#9154)"

This reverts commit 6155cc2. I propose reverting this change as it's blocking the release. It's causing more problems and i'm not sure if there's a way to fix these tests as they call UnmarshalConfig which doesn't provide a way to pass in WithIgnoreUnused https://github.com/open-telemetry/opentelemetry-collector/blob/6a726c955a137f05f5d5ad402098f3220f42ceb6/component/config.go#L30-L36

See
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/7466429082/job/20317807463?pr=30167
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.

2 participants