Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pdata] Deprecate map.Upsert/Update #5975

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Aug 26, 2022

pcommon.Map.Insert/Update/Upsert methods are the only methods allowing setting the mutable types on the Map. This goes against the established practice of building pdata.

This PR add extra methods to pcommon.Value and pcommon.Map to replace pcommon.Map.Insert/Update/Upsert methods. Deprecation of pcommon.Map.Insert is delayed since they are used in many places in contrib. So we want to replaces them first.

Updates: #5974 and #5973

@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Base: 92.14% // Head: 92.16% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (b3c473c) compared to base (3085e10).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5975      +/-   ##
==========================================
+ Coverage   92.14%   92.16%   +0.01%     
==========================================
  Files         210      210              
  Lines       13235    13266      +31     
==========================================
+ Hits        12196    12227      +31     
  Misses        822      822              
  Partials      217      217              
Impacted Files Coverage Δ
pdata/pcommon/common.go 97.43% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pdata/pcommon/common.go Outdated Show resolved Hide resolved
pdata/pcommon/common.go Show resolved Hide resolved
@dmitryax dmitryax marked this pull request as ready for review August 27, 2022 17:27
@dmitryax dmitryax requested review from a team and jpkrohling August 27, 2022 17:27
@dmitryax dmitryax marked this pull request as draft August 27, 2022 17:44
@dmitryax dmitryax marked this pull request as ready for review August 27, 2022 21:57
@dmitryax dmitryax force-pushed the deprecate-upsert branch 2 times, most recently from 251aa01 to 3f8ca9b Compare August 27, 2022 22:35
pdata/pcommon/common.go Outdated Show resolved Hide resolved
@bogdandrutu bogdandrutu changed the title [pdata] Deprecate map.Upsert/Insert/Update [pdata] Deprecate map.Upsert/Update Aug 29, 2022
@bogdandrutu bogdandrutu merged commit 1d6c295 into open-telemetry:main Aug 29, 2022
@dmitryax dmitryax deleted the deprecate-upsert branch September 4, 2022 17:37
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.

2 participants