Skip to content

Conversation

dmitryax
Copy link
Member

Similar to #13290, for oneOf fields

@dmitryax dmitryax requested review from a team and bogdandrutu as code owners June 28, 2025 18:03
@dmitryax dmitryax changed the title [chore] [pdata] Avoid an allocation when copy oneOf fields [chore] [pdata] Avoid allocations when copy oneOf fields Jun 28, 2025
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

❌ Patch coverage is 79.66102% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.44%. Comparing base (467db83) to head (c77c886).
⚠️ Report is 153 commits behind head on main.

Files with missing lines Patch % Lines
pdata/pmetric/generated_exemplar.go 50.00% 6 Missing ⚠️
pdata/pmetric/generated_numberdatapoint.go 50.00% 6 Missing ⚠️

❌ Your patch status has failed because the patch coverage (79.66%) 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   #13291      +/-   ##
==========================================
- Coverage   91.46%   91.44%   -0.03%     
==========================================
  Files         536      536              
  Lines       29590    29625      +35     
==========================================
+ Hits        27065    27090      +25     
- Misses       1994     2004      +10     
  Partials      531      531              

☔ View full report in Codecov by Sentry.
📢 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.

@dmitryax
Copy link
Member Author

contrib tests are fixed in open-telemetry/opentelemetry-collector-contrib#40978

@dmathieu
Copy link
Member

Should the new code path be tested?

@dmitryax
Copy link
Member Author

It's actually already covered. We just don't test every option for the primitive oneOf's. In copyOrigExemplar, we cover otlpmetrics.Exemplar_AsInt case. In copyOrigNumberDataPoint, we cover otlpmetrics.NumberDataPoint_AsDouble

@dmitryax dmitryax force-pushed the avoid-allocation-oneoff branch from 7e003ca to 7b4c926 Compare June 30, 2025 15:22
Copy link
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 Jul 15, 2025
@github-actions github-actions bot removed the Stale label Jul 22, 2025
@dmitryax dmitryax force-pushed the avoid-allocation-oneoff branch from 7b4c926 to c77c886 Compare July 24, 2025 22:52
Copy link
Contributor

github-actions bot commented Aug 8, 2025

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 Aug 8, 2025
Copy link
Contributor

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

@github-actions github-actions bot closed this Aug 23, 2025
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.

3 participants