[cmd/mdatagen] Localize same-repo schema refs using import root path - #14774
Conversation
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
410ae6c to
a17c1d2
Compare
Codecov Report❌ Patch coverage is
❌ 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. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 30.43%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | BenchmarkTraceSizeSpanCount |
60 ns | 46 ns | +30.43% |
Comparing dmitryax:fix-mdatagen-refs (cf88171) with main (7cd8f58)
Footnotes
-
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. ↩
665ab5d
…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
…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
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