-
Notifications
You must be signed in to change notification settings - Fork 44
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
PF extract inputs from outputs tests #2225
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2225 +/- ##
==========================================
- Coverage 60.66% 60.65% -0.01%
==========================================
Files 356 356
Lines 46447 46447
==========================================
- Hits 28176 28174 -2
- Misses 16711 16712 +1
- Partials 1560 1561 +1 ☔ View full report in Codecov by Sentry. |
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.
This is really good to have, and a nice springboard for doing #2218 right!
Can the individual test names describe the expected behavior under test? e.g. StringWithDefaultExtractsToPropertyAsString` or whatever we're asserting. 🙏
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.
Thanks for adding test coverage before addressing #2218.
Fixes an issue with the SDKv2 and PF input extraction. During import we wrongly return values for properties which are fully computed which causes invalid programs to be generated. ~The object check in `CastToTypeObject` was wrong for SDKV2 objects: https://github.com/pulumi/pulumi-terraform-bridge/blob/48fd41bd16e2f7f933bb9390ab7619d52faabb6d/pkg/tfshim/util/types.go#L36~ The `CastToTypeObject` object check is wrong for both SDKv2 and PF. For the SDKV2 only sets and lists can have a `Resource` `.Elem`. For PF it list-nested blocks are represented with a `Resource` `.Elem` in the shim layer, so the check did not catch these. PF details here: #2231 This fixes the check and adds regression tests for the broken imports which resulted from 2180. Test coverage added in #2224 for sdkv2 and #2225 for pf. fixes #2180 depends on pulumi/providertest#91 stacked on #2225
This PR has been shipped in release v3.88.0. |
This adds adds missing test coverage for
ExtractInputsFromOutputs
for various PF schemas.ExtractInputsFromOutputs
is a shared function so we should have coverage on both sides to make sure we don't cause regressions when fixing one.Similar to #2224 but on the PF side.
This is in preparation for #2181 for #2180.
Seeing some more evidence of #2218 here.