Skip to content

[cmd/mdatagen] Localize same-repo schema refs using import root path - #14773

Merged
dmitryax merged 3 commits into
open-telemetry:prepare-release-prs/0.148.0from
dmitryax:fix-cfggen-blocker
Mar 17, 2026
Merged

[cmd/mdatagen] Localize same-repo schema refs using import root path#14773
dmitryax merged 3 commits into
open-telemetry:prepare-release-prs/0.148.0from
dmitryax:fix-cfggen-blocker

Conversation

@dmitryax

@dmitryax dmitryax commented Mar 17, 2026

Copy link
Copy Markdown
Member

Same as #14774, against failing release branch

This change make mdatagen to rewrite same-repo schema references to absolute local refs during schema generation and resolution.

Instead of keeping refs like go.opentelemetry.io/collector/filter.config as versioned external references, mdatagen now converts them to /filter.config when the ref belongs to the current repo import root.

This avoids generator failures in release/version-bump PRs where mdatagen would otherwise try to resolve schemas from a not-yet-published version tag or .schemas/ cache. See https://github.com/open-telemetry/opentelemetry-collector/actions/runs/23166843771/job/67309001982?pr=14772

@dmitryax
dmitryax requested a review from a team as a code owner March 17, 2026 00:33
@dmitryax
dmitryax requested review from evan-bradley and removed request for a team March 17, 2026 00:33
@codecov

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.37%. Comparing base (ede31f8) to head (91e8b93).
⚠️ Report is 1 commits behind head on prepare-release-prs/0.148.0.

Files with missing lines Patch % Lines
cmd/mdatagen/internal/command.go 91.30% 0 Missing and 2 partials ⚠️

❌ Your patch status has failed because the patch coverage (92.59%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           prepare-release-prs/0.148.0   #14773      +/-   ##
===============================================================
- Coverage                        91.38%   91.37%   -0.01%     
===============================================================
  Files                              695      695              
  Lines                            44390    44400      +10     
===============================================================
+ Hits                             40567    40572       +5     
- Misses                            2689     2692       +3     
- Partials                          1134     1136       +2     

☔ View full report in Codecov by Sentry.
📢 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.

This change make mdatagen to rewrite same-repo schema references to
absolute local refs during schema generation and resolution.

Instead of keeping refs like go.opentelemetry.io/collector/filter.config
as versioned external references, mdatagen now converts them to
/filter.config when the ref belongs to the current repo import root.

This avoids generator failures in release/version-bump PRs where
mdatagen would otherwise try to resolve schemas from a not-yet-published
version tag or .schemas/<next-version> cache. See
https://github.com/open-telemetry/opentelemetry-collector/actions/runs/23166843771/job/67309001982?pr=14772
@dmitryax
dmitryax force-pushed the fix-cfggen-blocker branch from 9b89ef3 to f408633 Compare March 17, 2026 03:01
@dmitryax
dmitryax merged commit d6b8254 into open-telemetry:prepare-release-prs/0.148.0 Mar 17, 2026
44 of 45 checks passed
@dmitryax
dmitryax deleted the fix-cfggen-blocker branch March 17, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants