Skip to content

[cmd/mdatagen] Fix the extra blank line in the readme template file#15307

Merged
codeboten merged 5 commits into
open-telemetry:mainfrom
ravishankar-sumo:readmetmp-fix-extra-line
Jun 4, 2026
Merged

[cmd/mdatagen] Fix the extra blank line in the readme template file#15307
codeboten merged 5 commits into
open-telemetry:mainfrom
ravishankar-sumo:readmetmp-fix-extra-line

Conversation

@ravishankar-sumo

Copy link
Copy Markdown
Contributor

Description

Fixes the extra blank line in REAME.md files

Link to tracking issue

Fixes #15306

Testing

Local testing is done

Documentation

@jkoronaAtCisco jkoronaAtCisco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you regenerate readme files for sample components with make mdatagen-test?

@ravishankar-sumo
ravishankar-sumo force-pushed the readmetmp-fix-extra-line branch from d2c35ad to 2381a94 Compare May 20, 2026 17:44
@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

@jkoronaAtCisco I have generated the files. PTAL

@jkoronaAtCisco

Copy link
Copy Markdown
Member

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.

@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

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

open-telemetry/opentelemetry-collector-contrib#48366

@ravishankar-sumo
ravishankar-sumo force-pushed the readmetmp-fix-extra-line branch from 2381a94 to 5ddb348 Compare May 21, 2026 05:05
@codspeed-hq

codspeed-hq Bot commented May 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 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.

✅ 7 untouched benchmarks


Comparing ravishankar-sumo:readmetmp-fix-extra-line (cbb72df) with main (478a9fd)

Open in CodSpeed

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.27%. Comparing base (478a9fd) to head (cbb72df).

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

@andrzej-stencel andrzej-stencel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a space between the description and the status table.

@ravishankar-sumo
ravishankar-sumo force-pushed the readmetmp-fix-extra-line branch 2 times, most recently from 58fcf66 to 0c6cb53 Compare May 22, 2026 07:58
@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

@andrzej-stencel I have made a template function to do the trimming. PTAL

@andrzej-stencel andrzej-stencel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ravishankar-sumo
ravishankar-sumo force-pushed the readmetmp-fix-extra-line branch 4 times, most recently from 86bdc86 to 43e7bd8 Compare May 29, 2026 13:15
@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

Fixed a test failure. Can we trigger again

@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

Tagging maintainer for merging @dmitryax

@codeboten
codeboten enabled auto-merge June 3, 2026 16:38
@codeboten
codeboten added this pull request to the merge queue Jun 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 3, 2026
@ravishankar-sumo
ravishankar-sumo force-pushed the readmetmp-fix-extra-line branch from a440507 to cbb72df Compare June 4, 2026 09:47
@ravishankar-sumo

Copy link
Copy Markdown
Contributor Author

The failure seems like a flaky test reference: #15395 can we re trigger this pipeline

@codeboten
codeboten added this pull request to the merge queue Jun 4, 2026
Merged via the queue into open-telemetry:main with commit dbd5c55 Jun 4, 2026
67 checks passed
@otelbot

otelbot Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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.

apurvagandhi pushed a commit to fidelity-contributions/open-telemetry-opentelemetry-collector that referenced this pull request Jun 24, 2026
…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.-->
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.

Remove extra line in README.md

4 participants