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

Fix PRC big int creation #2286

Merged
merged 6 commits into from
Aug 8, 2024
Merged

Fix PRC big int creation #2286

merged 6 commits into from
Aug 8, 2024

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Aug 6, 2024

Big integers get truncated under PRC, even if treated as strings on the pulumi side. This means that #1896 does not work under PRC.

The reason for that is that we do a round trip to JSON when creating the resource where we truncate the integer. When decoding json numbers we have to use json.Number instead of the default float in order to not truncate 64 bit integers.

Fixes #2284

@VenelinMartinov VenelinMartinov changed the title fix prc big int Fix PRC big int creation Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.13%. Comparing base (b40324a) to head (f5fbec5).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2286      +/-   ##
==========================================
+ Coverage   56.71%   58.13%   +1.42%     
==========================================
  Files         361      360       -1     
  Lines       49547    41567    -7980     
==========================================
- Hits        28099    24167    -3932     
+ Misses      19906    15848    -4058     
- Partials     1542     1552      +10     

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

Copy link
Member

@t0yv0 t0yv0 left a comment

Choose a reason for hiding this comment

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

🚢

@VenelinMartinov VenelinMartinov enabled auto-merge (squash) August 8, 2024 12:56
@VenelinMartinov VenelinMartinov merged commit 5e88c5b into master Aug 8, 2024
11 checks passed
@VenelinMartinov VenelinMartinov deleted the vvm/fix_prc_bigint branch August 8, 2024 13:11
@mjeffryes mjeffryes added this to the 0.108 milestone Aug 16, 2024
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.

SDKv2 PlanResourceChange truncates big integers
4 participants