-
Notifications
You must be signed in to change notification settings - Fork 50
Implement Dynamic Type serialization #3099
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
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
0b9e04a to
1a85114
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3099 +/- ##
==========================================
- Coverage 68.71% 68.62% -0.10%
==========================================
Files 336 336
Lines 43690 43811 +121
==========================================
+ Hits 30022 30064 +42
- Misses 11954 12037 +83
+ Partials 1714 1710 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ba5a08d to
6259947
Compare
a49af42 to
42f324d
Compare
8d6a25c to
f6dce5d
Compare
48e0f35 to
0bbbf1c
Compare
0bbbf1c to
d2a5a22
Compare
16d20be to
2a50b2b
Compare
62b2953 to
a580ec9
Compare
This reverts commit a580ec9.
335724a to
478e3cb
Compare
88b4680 to
e14db58
Compare
Zaid-Ajaj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question about now including timeouts in the delta
|
This PR has been shipped in release v3.110.0. |
This PR adds support for correctly serializing and de-serializing properties with a Dynamic Type schema. This ensures that properties of this schema type can be correctly saved to state and then read back with any provider version.
There are a few changes which had to be made to make this all work:
RawStateDeltas(these are the "diffs" between the TF state and Pulumi state), we need to make sure that properties with a Dynamic schema type always get aReplacedelta. This is a full recording of the TF value, instead of a "diff" with the pulumi state. This is because the JSON representation of properties with Dynamic schema type need to contain their value type as well as the value itself. This is then used to read the state back into the correct runtime type.ctyandhctyvalueshim implementations for thectypackage and the Hashi fork of thectypackage. This is necessary because the SDKv1 uses thectypackage while the SDKv2 uses thehctypackage. The two implementations are practically identical.fixes #3078