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

[component] Allow calling component.ValidateConfig at the top level #12102

Merged

Conversation

evan-bradley
Copy link
Contributor

@evan-bradley evan-bradley commented Jan 15, 2025

Description

Updates component.ValidateConfig to recurse through the entire config object by checking for ConfigValidator implementations of structs that are under interfaces. Right now ValidateConfig stops at things like component.Config which themselves can't implement component.ValidateConfig because callValidateIfPossible can only see the interface and not the concrete type before this change.

Link to tracking issue

Replaces #12058.

Works toward #11524.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.60%. Comparing base (6757cc7) to head (c53dbe7).
Report is 45 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12102   +/-   ##
=======================================
  Coverage   91.60%   91.60%           
=======================================
  Files         461      461           
  Lines       24678    24678           
=======================================
  Hits        22607    22607           
  Misses       1689     1689           
  Partials      382      382           

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

service/config.go Outdated Show resolved Hide resolved
@evan-bradley
Copy link
Contributor Author

I'm skipping the contrib tests for now, I'll fix any errors with an update-otel PR in contrib.

@evan-bradley evan-bradley marked this pull request as ready for review January 16, 2025 20:29
@evan-bradley evan-bradley requested a review from a team as a code owner January 16, 2025 20:29
@mx-psi mx-psi requested a review from jade-guiton-dd January 20, 2025 13:07
@mx-psi mx-psi requested a review from TylerHelmuth January 20, 2025 16:36
@TylerHelmuth TylerHelmuth added the ready-to-merge Code review completed; ready to merge by maintainers label Jan 22, 2025
@mx-psi mx-psi added this pull request to the merge queue Jan 23, 2025
Merged via the queue into open-telemetry:main with commit 24f88da Jan 23, 2025
67 of 68 checks passed
sincejune added a commit to sincejune/opentelemetry-collector that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Code review completed; ready to merge by maintainers Skip Contrib Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants