Skip to content

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

Merged
dmitryax merged 3 commits into
open-telemetry:mainfrom
dmitryax:fix-mdatagen-refs
Mar 17, 2026
Merged

[cmd/mdatagen] Localize same-repo schema refs using import root path#14774
dmitryax merged 3 commits into
open-telemetry:mainfrom
dmitryax:fix-mdatagen-refs

Conversation

@dmitryax

Copy link
Copy Markdown
Member

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:34
@dmitryax
dmitryax requested a review from bogdandrutu March 17, 2026 00:34
@dmitryax dmitryax added the release:blocker The issue must be resolved before cutting the next release label Mar 17, 2026
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-mdatagen-refs branch from 410ae6c to a17c1d2 Compare March 17, 2026 00:45
@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.38%. Comparing base (7cd8f58) to head (cf88171).
⚠️ Report is 1 commits behind head on main.

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             @@
##             main   #14774      +/-   ##
==========================================
- Coverage   91.40%   91.38%   -0.02%     
==========================================
  Files         695      695              
  Lines       44390    44400      +10     
==========================================
+ Hits        40573    40575       +2     
- Misses       2685     2690       +5     
- Partials     1132     1135       +3     

☔ 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.

@dmitryax dmitryax added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 17, 2026
@codspeed-hq

codspeed-hq Bot commented Mar 17, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 30.43%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 6 untouched benchmarks
⏩ 76 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
BenchmarkTraceSizeSpanCount 60 ns 46 ns +30.43%

Comparing dmitryax:fix-mdatagen-refs (cf88171) with main (7cd8f58)

Open in CodSpeed

Footnotes

  1. 76 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dmitryax
dmitryax added this pull request to the merge queue Mar 17, 2026
Merged via the queue into open-telemetry:main with commit 665ab5d Mar 17, 2026
65 of 66 checks passed
@dmitryax
dmitryax deleted the fix-mdatagen-refs branch March 17, 2026 03:56
dmitryax added a commit that referenced this pull request Mar 17, 2026
…14773)

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/<next-version> cache. See
https://github.com/open-telemetry/opentelemetry-collector/actions/runs/23166843771/job/67309001982?pr=14772
blakerouse pushed a commit to blakerouse/opentelemetry-collector that referenced this pull request May 13, 2026
…pen-telemetry#14774)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd/mdatagen release:blocker The issue must be resolved before cutting the next release Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants