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

When deserializing JSON, accept both int and string in 'intValue' #1906

Merged
merged 7 commits into from
Jul 18, 2024

Conversation

RazvanRotari
Copy link
Contributor

Fixes #1905
Design discussion issue (if applicable) #

Changes

When deserializing JSON, accept both int and string in 'intValue' field of AnyValue.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@RazvanRotari RazvanRotari requested a review from a team as a code owner July 2, 2024 09:31
Copy link

linux-foundation-easycla bot commented Jul 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

codecov bot commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.9%. Comparing base (a9b8621) to head (e93b5f0).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1906     +/-   ##
=======================================
- Coverage   74.9%   74.9%   -0.1%     
=======================================
  Files        122     122             
  Lines      20311   20311             
=======================================
- Hits       15217   15216      -1     
- Misses      5094    5095      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lalitb
Copy link
Member

lalitb commented Jul 3, 2024

@RazvanRotari Thanks for the PR. Can you also add tests to validate this? There are some relevant unit-tests here - test_serde if that helps.

@RazvanRotari
Copy link
Contributor Author

@lalitb Modified test_serde to check for this case.

@pravic
Copy link

pravic commented Jul 16, 2024

@lalitb Hi guys, any updates on this? We also have encountered this problem.

@pravic
Copy link

pravic commented Jul 16, 2024

@lalitb @cijothomas Looks like the latest cc crate can't be built with rustc 1.65. Should it be fixed (pinned, I assume?) here or in a separate PR?

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.

Thanks @RazvanRotari . Nicely done. LGTM.

@lalitb
Copy link
Member

lalitb commented Jul 17, 2024

@lalitb @cijothomas Looks like the latest cc crate can't be built with rustc 1.65. Should it be fixed (pinned, I assume?) here or in a separate PR?

I think it was fixed in #1924

@lalitb lalitb merged commit e1a3494 into open-telemetry:main Jul 18, 2024
25 checks passed
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.

[Bug]: Fail to deserialize JSON request from opentelemetry-js
4 participants