-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow replace if either old or new protect is false #8873
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8873 +/- ##
==========================================
+ Coverage 59.37% 59.38% +0.01%
==========================================
Files 639 639
Lines 98297 98298 +1
Branches 1389 1389
==========================================
+ Hits 58365 58379 +14
+ Misses 36631 36616 -15
- Partials 3301 3303 +2
Continue to review full report at Codecov.
|
@@ -604,7 +604,7 @@ func (sg *stepGenerator) generateStepsFromDiff( | |||
// If this resource is protected we can't replace it because that entails a delete | |||
// Note that we do allow unprotecting and replacing to happen in a single update | |||
// cycle, we don't look at old.Protect here. | |||
if goal.Protect { |
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.
Why change between goal.Protect
and new.Protect
? Will they always agree?
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.
Yeh we set new.Protect from goal.Protect higher up in the step generator.
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.
LGTM
Description
Allow a resource to be replaced if either it's old or new state has the protect flag disabled. Importantly this still doesn't allow a resource to be just deleted in the same update operation that disables it's protect flag.
Fixes #8871
Checklist