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

[SDK] Fix schema URL precedence bug in Resource::Merge #2036

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

johanpel
Copy link
Contributor

@johanpel johanpel commented Mar 9, 2023

Fixes #2035

Changes

In Resource::Merge this PR will cause the old schema url to be used if the updating schema url is empty. This is in accord with the specification.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #2036 (6675684) into main (5046443) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2036      +/-   ##
==========================================
+ Coverage   87.30%   87.32%   +0.03%     
==========================================
  Files         166      166              
  Lines        4723     4723              
==========================================
+ Hits         4123     4124       +1     
+ Misses        600      599       -1     
Impacted Files Coverage Δ
sdk/include/opentelemetry/sdk/resource/resource.h 100.00% <ø> (ø)
sdk/src/resource/resource.cc 96.30% <100.00%> (ø)

... and 1 file with indirect coverage changes

@esigo esigo added size/M Denotes a PR that changes 30-99 lines. bug Something isn't working labels Mar 9, 2023
@lalitb
Copy link
Member

lalitb commented Mar 10, 2023

@johanpel - The changes look good. One you feel it is ready, can you make it available for review ?

@johanpel johanpel marked this pull request as ready for review March 10, 2023 05:21
@johanpel johanpel requested a review from a team March 10, 2023 05:21
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@lalitb lalitb merged commit 1ac9caf into open-telemetry:main Mar 10, 2023
@marcalff marcalff changed the title Pick old schema url when updating schema url is empty according to specification in Resource::Merge [SDK] Fix schema URL precedence bug in Resource::Merge Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Resource SDK] Merge implementation favors "updating" schema_url over "old" schema_url when empty
4 participants