Allow updates of instances that failed a previous update. #1502
Allow updates of instances that failed a previous update. #1502
Conversation
@@ -1426,6 +1426,9 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro | |||
if deleting { | |||
toUpdate.Status.DeprovisionStatus = v1beta1.ServiceInstanceDeprovisionStatusSucceeded | |||
} | |||
if !deleting { |
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.
s/if !deleting/else/
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.
The reason that I didn't use else here is that the two branches are not related. It is just coincidental that the conditions are opposites.
@@ -2020,3 +2023,16 @@ func shouldStartOrphanMitigation(statusCode int) bool { | |||
statusCode == http.StatusRequestTimeout || | |||
is5XX | |||
} | |||
|
|||
// removeServiceInstanceFailedCondition removes the Failed condition from the |
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.
So, when an instance which provisioned but then failed an update is then updated again, we remove the failed condition? maybe we just shouldn't set it when updates fail. WDYT?
b501844
to
1770971
Compare
@@ -1347,12 +1369,18 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro | |||
v1beta1.ConditionUnknown, | |||
errorOrphanMitigationFailedReason, | |||
"Orphan mitigation failed: "+s) | |||
} else { | |||
} else if deleting || provisioning { |
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 |
Fixes #1487.