-
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
Add a fallback for detailed diff replace decisions to ensure detailed diff is presentation-only #2757
Conversation
… diff is presentation-only
This change is part of the following stack:
Change managed by git-spice. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2757 +/- ##
=======================================
Coverage 69.63% 69.63%
=======================================
Files 302 302
Lines 38736 38775 +39
=======================================
+ Hits 26972 27001 +29
- Misses 10247 10256 +9
- Partials 1517 1518 +1 ☔ View full report in Codecov by Sentry. |
…iff_replace_fallback2
@@ -900,7 +900,7 @@ func TestUnknownCollectionForceNewDetailedDiff(t *testing.T) { | |||
runTest(t, program2, autogold.Expect(` | |||
+ prov:index/aux:Aux: (create) | |||
[urn=urn:pulumi:test::test::prov:index/aux:Aux::auxRes] | |||
+-prov:index/test:Test: (replace) | |||
~ prov:index/test:Test: (update) |
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.
It seems that TF is optimistic about replacing ForceNew properties with unknown and we were being pessimistic. This change ensures we match TF and ForceNew proeprties replaced with unknowns are now predicted NOT to cause a replacement.
We can add a workaround if we disagree here.
I've stood up #2747 again as it got accidentally merged into another branch. |
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.
I'm pretty sure that I reviewed another version of this PR already.
This PR has been shipped in release v3.99.0. |
This change adds a fallback for the detailed diff replace decision. This ensures that the detailed diff is presentation only.
If we fail to identify the reason for a replace in the detailed diff calculation we mark it against
__meta
, similar to what we did before:pulumi-terraform-bridge/pkg/tfbridge/provider.go
Line 1262 in a952164
If we incorrectly identify a non-existent replace we demote it to an update/create/delete.
This is flagged behind the Accurate Previews flag.
I've stood up #2747 again as it got accidentally merged into another branch.
fixes #2674
fixes #2726