[cmd/mdatagen] Fix the extra blank line in the readme template file#15307
Conversation
2516bca to
edbf14b
Compare
edbf14b to
d2c35ad
Compare
jkoronaAtCisco
left a comment
There was a problem hiding this comment.
Can you regenerate readme files for sample components with make mdatagen-test?
d2c35ad to
2381a94
Compare
|
@jkoronaAtCisco I have generated the files. PTAL |
|
I'm not sure we really need that change. For raw content it's a bit more readable with empty line IMO and github renderers it without empty line anyway. |
|
@jkoronaAtCisco Yeah right but the markdown linter will flag extra lines. We have ci-cd improvement in the contrib to add markdown lint. Hence we need this change. |
2381a94 to
5ddb348
Compare
Merging this PR will not alter performance
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15307 +/- ##
=======================================
Coverage 91.27% 91.27%
=======================================
Files 709 709
Lines 46222 46222
=======================================
Hits 42190 42190
Misses 2817 2817
Partials 1215 1215 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
andrzej-stencel
left a comment
There was a problem hiding this comment.
I agree ideally generated output should pass markdown linter. I don't think this change will accomplish this.
The Markdown linter will complain if there's no empty line between the description and the status table (MD058). It will also complain when there is more than one empty line (MD012).
If metadata.yaml has a one-line description like this:
description: This receiver is used for testing purposes to check the output of mdatagen.The description will not include a newline.
However, if description is defined as a multiline string with |, the trailing newline is included in the value. Example:
description: |
The Zookeeper scraper collects metrics from a Zookeeper instance, using the `mntr` command. The `mntr` 4 letter word
command needs to be enabled for the scraper to be able to collect metrics.This change changes the rendering to remove the required empty line for single-line descriptions.
We need a different change in mdatagen that will make sure there is always exactly one empty line. I suppose trimming the trailing newline from description and adding a newline would do.
| <!-- status autogenerated section --> | ||
| # Sample Factory Receiver | ||
|
|
||
| This receiver is used for testing purposes to check the output of mdatagen. |
There was a problem hiding this comment.
I think there should be a space between the description and the status table.
58fcf66 to
0c6cb53
Compare
|
@andrzej-stencel I have made a template function to do the trimming. PTAL |
0c6cb53 to
2b623d2
Compare
andrzej-stencel
left a comment
There was a problem hiding this comment.
I think this is the right change, thank you! 👍
I tested it in Contrib on a couple components and it generates a single empty line between the description and the status table.
86bdc86 to
43e7bd8
Compare
|
Fixed a test failure. Can we trigger again |
|
Tagging maintainer for merging @dmitryax |
a440507 to
cbb72df
Compare
|
The failure seems like a flaky test reference: #15395 can we re trigger this pipeline |
|
Thank you for your contribution @ravishankar-sumo! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
…open-telemetry#15459) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Fixes the extra line in the documentation.md between extended description and table Similar to open-telemetry#15307 <!-- Issue number if applicable --> #### Link to tracking issue Fixes open-telemetry#15458 <!--Describe what testing was performed and which tests were added.--> #### Testing Local testing with one of the component. <!--Describe the documentation added.--> #### Documentation <!--Authorship attestation. See AGENTS.md for details. AI agents must not check this box on behalf of the user; the human author must check it themselves before the PR is ready for review.--> #### Authorship - [x] I, a human, wrote this pull request description myself. <!--Please delete paragraphs that you did not use before submitting.-->
Description
Fixes the extra blank line in REAME.md files
Link to tracking issue
Fixes #15306
Testing
Local testing is done
Documentation