Prevent errors from NoOp deposed changes#31902
Conversation
apparentlymart
left a comment
There was a problem hiding this comment.
This seems like a reasonable surgical change to fix the bug in the v1.3 branch!
For the main branch I wonder about reverting this and instead changing the logic inside the graph node execute function. I'd prefer for us to (cautiously) trend toward always having a complete graph and then handling the situation inside the normal control flow in the individual graph nodes, because these special exceptions in the graph builder have historically been a bug/regression hazard when adding new features. However, a decision on that need not block moving forward with this tactical fix.
|
That's a good point. The failure here isn't in the graph node, rather the very next block of code. I can easily rewrite this check so it only excludes the that block rather than skipping NoOp node entirely. |
ec56580 to
5a0d734
Compare
If a previously deposed object is deleted outside of Terraform, the next plan will result in a NoOp change for the deposed object. Fix the check to verify that the deposed object has an acceptable action rather than use the `update` flag.
5a0d734 to
f78ecef
Compare
apparentlymart
left a comment
There was a problem hiding this comment.
Oh, whoops... sorry I didn't notice you'd changed this PR to follow the new approach. This also looks good!
|
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
If a previously deposed object is deleted outside of Terraform, the next plan will result in a NoOp change for the deposed object.
If that NoOp change was flagged as an update to run any associated condition checks, it would fail the following test to ensure a deposed change is only ever participating in a delete operation. Fix the check to verify that the deposed object has an acceptable action rather than use the
updateflag.Fixes #31896