Skip to content

Conversation

dmitryax
Copy link
Member

Addresses #13267 (comment)

@dmitryax dmitryax requested review from a team, bogdandrutu, dmathieu and mx-psi as code owners June 28, 2025 17:27
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.63%. Comparing base (3b627ad) to head (3090436).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13290      +/-   ##
==========================================
- Coverage   91.64%   91.63%   -0.02%     
==========================================
  Files         522      522              
  Lines       29183    29223      +40     
==========================================
+ Hits        26746    26778      +32     
- Misses       1920     1926       +6     
- Partials      517      519       +2     

☔ 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

@dmitryax dmitryax force-pushed the address-pdatagen-comment branch from ebfd397 to 46f8c45 Compare June 30, 2025 03:16
@dmitryax dmitryax enabled auto-merge June 30, 2025 14:53
dest{{ .fieldName }} = &{{ .originStructType }}{}
dest.{{ .fieldName }}_ = dest{{ .fieldName }}
}
dest{{ .fieldName }}.{{ .fieldName }} = src.Get{{ .fieldName }}()
Copy link
Member

Choose a reason for hiding this comment

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

Why using the Getter that checks for nil since is not nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Updated

Copy link
Member Author

Choose a reason for hiding this comment

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

@bogdandrutu please take another look since it required significant enough change


const optionalPrimitiveCopyOrigTemplate = `if src.{{ .fieldName }}_ == nil {
dest.{{ .fieldName }}_ = nil
} else {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Can we return instead here, avoids an indentation.

Copy link
Member Author

@dmitryax dmitryax Jul 1, 2025

Choose a reason for hiding this comment

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

No, it's rendered as part of copying one field while there may be others after that. Only if we move this to a separate function

@dmitryax dmitryax added this pull request to the merge queue Jul 1, 2025
@bogdandrutu bogdandrutu removed this pull request from the merge queue due to a manual request Jul 1, 2025
@dmitryax dmitryax force-pushed the address-pdatagen-comment branch from 46f8c45 to 3090436 Compare July 1, 2025 16:40
@github-actions github-actions bot requested a review from bogdandrutu July 1, 2025 16:40
@dmitryax dmitryax added this pull request to the merge queue Jul 1, 2025
Merged via the queue into open-telemetry:main with commit 3bcdf80 Jul 1, 2025
56 checks passed
@dmitryax dmitryax deleted the address-pdatagen-comment branch July 1, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants