-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Prevent errors from NoOp deposed changes #31902
Conversation
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 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
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.
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
update
flag.Fixes #31896