@@ -485,23 +485,34 @@ func (b *UpdateEndpoint) shouldSkipNewOperation(previousInstance, currentInstanc
485485 // do not compare "Active" field
486486 previousInstance .Parameters .ErsContext .Active = currentInstance .Parameters .ErsContext .Active
487487 if ! reflect .DeepEqual (previousInstance .Parameters , currentInstance .Parameters ) {
488+ logger .Info ("Parameters changed, cannot skip new operation" )
489+
490+ if ! reflect .DeepEqual (previousInstance .Parameters .ErsContext , currentInstance .Parameters .ErsContext ) {
491+ logger .Info ("Context changed" )
492+ }
493+ if ! reflect .DeepEqual (previousInstance .Parameters .Parameters , currentInstance .Parameters .Parameters ) {
494+ logger .Info ("Parameters changed" )
495+ }
488496 return false , nil
489497 }
490498 if previousInstance .ServicePlanID != currentInstance .ServicePlanID {
499+ logger .Info ("Plan changed, cannot skip new operation" )
491500 return false , nil
492501 }
493502 if previousInstance .GlobalAccountID != currentInstance .GlobalAccountID {
503+ logger .Info ("GlobalAccountID changed, cannot skip new operation" )
494504 return false , nil
495505 }
496506 lastOperation , err := b .operationStorage .GetLastOperationWithAllStates (currentInstance .InstanceID )
497507 if err != nil {
508+ logger .Error (fmt .Sprintf ("unable to get last operation: %s, cannot skip new operation" , err .Error ()))
498509 return false , nil
499510 }
500511
501512 // if the last operation did not succeed, we cannot respond synchronously
502513 // Last change could fail, we cannot accept and response OK for next update which do the same.
503514 if lastOperation .State == domain .Failed {
504- logger .Info (fmt .Sprintf ("Last operation %s %s failed, cannot respond synchronously " , lastOperation .Type , lastOperation .ID ))
515+ logger .Info (fmt .Sprintf ("Last operation %s %s failed, cannot skip new operation " , lastOperation .Type , lastOperation .ID ))
505516 return false , lastOperation
506517 }
507518
0 commit comments