-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
mdatagen: get package name from metadata #11468
base: main
Are you sure you want to change the base?
Conversation
I noticed a mistake in my previous PR open-telemetry#11232; some function calls did not pass the correct package name in (passing in "metadata" instead of the intended generated package name). This PR attempts to address the potential for this mistake to even occur by providing a wrapper `generateFile` function that automatically uses the generated package name from the metadata. The original version of the function that accepts a package name is intact for the templates that are going in the base package instead of the generated one.
3cd7f36
to
a7da76a
Compare
I believe this change should not need a changelog. It is a fix for a bug that never made it into a release, and otherwise provides no user-visible changes. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11468 +/- ##
==========================================
- Coverage 91.46% 91.36% -0.10%
==========================================
Files 435 441 +6
Lines 23757 24369 +612
==========================================
+ Hits 21729 22265 +536
- Misses 1650 1718 +68
- Partials 378 386 +8 ☔ View full report in Codecov by Sentry. |
The new coverage issue are just for the generated |
Description
I noticed a mistake in my previous PR #11232; some function calls did not pass the correct package name in (passing in "metadata" instead of the intended generated package name). This PR attempts to address the potential for this mistake to even occur by providing a wrapper
generateFile
function that automatically uses the generated package name from the metadata. The original version of the function that accepts a package name is intact for the templates that are going in the base package instead of the generated one.Link to tracking issue
Bug originally from #11231
Fixes #11469
Testing
make mdatagen-test
Also added a custom generated package to the sample components, which would have caught the original bug.
Documentation