Skip to content

Strengthen Config v2 conversion boundaries#2700

Merged
grcevski merged 2 commits into
open-telemetry:mainfrom
MrAlias:agent/config-v2-hardening
Jul 20, 2026
Merged

Strengthen Config v2 conversion boundaries#2700
grcevski merged 2 commits into
open-telemetry:mainfrom
MrAlias:agent/config-v2-hardening

Conversation

@MrAlias

@MrAlias MrAlias commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Internal Config v2 hardening work split from the CLI surface (#2679 and #2682) so the conversion contract can be reviewed independently.

  • Reject selectors and declarative fields that the legacy runtime cannot represent.
  • Preserve selector semantics while applying Config v2 defaults.
  • Separate static configuration validation from host-dependent checks for standalone and receiver callers.
  • Harden schema parsing and generated-document handling.

Verification

  • make generate/all
  • go test ./internal/config/convert ./internal/config/schema ./pkg/obi

Validate Config v2 selectors and reject declarative fields that cannot
be represented by the legacy runtime. Split static validation from host
checks so standalone and receiver callers can validate safely.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.87361% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.36%. Comparing base (bc8036a) to head (94b230a).

Files with missing lines Patch % Lines
internal/config/schema/schema.go 72.50% 17 Missing and 16 partials ⚠️
pkg/obi/config.go 92.68% 2 Missing and 1 partial ⚠️
internal/config/convert/export.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2700      +/-   ##
==========================================
+ Coverage   69.70%   70.36%   +0.65%     
==========================================
  Files         354      354              
  Lines       49726    49975     +249     
==========================================
+ Hits        34663    35163     +500     
+ Misses      12897    12632     -265     
- Partials     2166     2180      +14     
Flag Coverage Δ
integration-test 50.59% <47.36%> (-0.34%) ⬇️
integration-test-arm 25.69% <48.78%> (-0.86%) ⬇️
integration-test-vm-5.15-lts ?
integration-test-vm-6.18-lts ?
k8s-integration-test 29.61% <51.21%> (-4.98%) ⬇️
oats-test 31.22% <48.78%> (-3.81%) ⬇️
unittests 65.56% <85.71%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MrAlias
MrAlias marked this pull request as ready for review July 17, 2026 22:21
@MrAlias
MrAlias requested a review from a team as a code owner July 17, 2026 22:21

@mariomac mariomac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@grcevski grcevski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@grcevski
grcevski merged commit 1cfa8ea into open-telemetry:main Jul 20, 2026
116 of 118 checks passed
@MrAlias
MrAlias deleted the agent/config-v2-hardening branch July 20, 2026 15: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