[deployment] Send TaskComplete to event stream during restore
Without the TaskComplete() message the DeployStatus grpc request never
finishes server-side. This can lead to the service failing to stop
when sent a TERM.
@@ -480,6 +480,9 @@ func (r *Runner) startRestoreOperations(ctx context.Context) {
// and that any listeners on the event stream will get the task complete
// signal.
r.unlockDeployment()
+ if r.eventSender != nil {
+ r.eventSender.TaskComplete()
+ }
close(r.errChan)
close(r.eventTerm)
r.clearRunningTask()
