Skip to content

Autogenerate config marshal and unmarshal test with datagen - #14599

Closed
iblancasa wants to merge 26 commits into
open-telemetry:mainfrom
iblancasa:12906
Closed

Autogenerate config marshal and unmarshal test with datagen#14599
iblancasa wants to merge 26 commits into
open-telemetry:mainfrom
iblancasa:12906

Conversation

@iblancasa

Copy link
Copy Markdown
Member

Description

Add new test to ensure configuration can be marshaled and unmarshaled.

Link to tracking issue

Fixes #11711, #12906

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@codecov

codecov Bot commented Feb 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.37%. Comparing base (98f555d) to head (29d09fd).
⚠️ Report is 125 commits behind head on main.

Files with missing lines Patch % Lines
cmd/mdatagen/internal/cfggen/generation.go 87.09% 3 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (87.50%) 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   #14599      +/-   ##
==========================================
- Coverage   90.38%   90.37%   -0.01%     
==========================================
  Files         702      702              
  Lines       54097    54127      +30     
==========================================
+ Hits        48893    48919      +26     
- Misses       4054     4057       +3     
- Partials     1150     1151       +1     

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

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

Not sure where to add these, but can you add tests that use "bad" example configs to show where the TestComponentConfigMarshal test fails?

Comment thread cmd/mdatagen/internal/templates/component_test.go.tmpl
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Comment thread cmd/mdatagen/internal/templates/component_test.go.tmpl
@github-actions

Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Mar 14, 2026
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@codspeed-hq

codspeed-hq Bot commented Mar 31, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 34.73%

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

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

Performance Changes

Benchmark BASE HEAD Efficiency
BenchmarkBatchMetricProcessor2k 186.2 ms 138.2 ms +34.73%

Comparing iblancasa:12906 (29d09fd) with main (98f555d)

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.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Apr 17, 2026
@iblancasa

Copy link
Copy Markdown
Member Author

I'm trying to make this PR happen but there are too many issues with contrib :/

@iblancasa

Copy link
Copy Markdown
Member Author

@andrzej-stencel @evan-bradley what do you think about adding a new field to mdatagen to generate this test for the different components? I propose something like:

  1. Add a new field like generate_marshal_unmarshal_test maybe true by default
  2. It is disabled for all the "offending" components
  3. I can create PRs fixing and enabling the test for the offending components
  4. After all the components have it enabled, the generate_marshal_unmarshal_test field is removed

@github-actions github-actions Bot removed the Stale label Apr 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added Stale and removed Stale labels May 16, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Jun 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions Bot closed this Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure config structs can be marshaled into YAML

3 participants