-
Notifications
You must be signed in to change notification settings - Fork 43
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
Additional tests for failures in provider.go Create #2710
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change is part of the following stack: Change managed by git-spice. |
This was referenced Dec 10, 2024
VenelinMartinov
force-pushed
the
expose-providerserverfrominfo
branch
from
December 10, 2024 14:38
6333631
to
ff0668a
Compare
VenelinMartinov
force-pushed
the
additional-tests-for-failures-in
branch
from
December 10, 2024 14:38
905d2c3
to
4b6e72f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2710 +/- ##
==========================================
+ Coverage 69.46% 69.49% +0.02%
==========================================
Files 301 301
Lines 38644 38644
==========================================
+ Hits 26845 26856 +11
+ Misses 10275 10267 -8
+ Partials 1524 1521 -3 ☔ View full report in Codecov by Sentry. |
iwahbe
approved these changes
Dec 10, 2024
VenelinMartinov
force-pushed
the
additional-tests-for-failures-in
branch
from
December 10, 2024 15:50
4b6e72f
to
6aa8ff8
Compare
This was referenced Dec 10, 2024
This PR has been shipped in release v3.97.1. |
VenelinMartinov
added a commit
that referenced
this pull request
Dec 11, 2024
In the SDKv2 bridge under PlanResourceChange we are not passing any state we receive during TF Apply back to the engine if we also received an error. This causes us to incorrectly miss any resources which were created but encountered errors during the creation process. The engine should see these as ResourceInitError, which allows the engine to attempt to update the partially created resource on the next up. This PR fixes the issue by passing the state down to the engine in the case when we receive an error and a non-nil state from TF during Apply. This is the second attempt at this. The first was #2695 but was reverted because it caused a different panic: #2706. We added a regression test for that in #2710 The reason for that panic was that we were now creating a non-nil `InstanceState` with a nil `stateValue` which causes the `ID` function to panic. This PR fixes both issues by not allowing non-nil states with nil `stateValue`s and by preventing the panic in `ID`. There was also a bit of fun with go nil interfaces along the way, which is the reason why `ApplyResourceChange` now returns a `shim.InstanceState` interface instead of a `*v2InstanceState2`. Otherwise we end up creating a non-nil interface with a nil value. related to pulumi/pulumi-gcp#2700 related to pulumi/pulumi-aws#4759 fixes #2696
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additional tests for failure modes in
provider.go
'sCreate
method. This would have caught #2706