From 7421836a1e755530a3e094706e5e81aa94725e05 Mon Sep 17 00:00:00 2001 From: Lyon Hill Date: Mon, 11 Nov 2019 13:52:04 -0700 Subject: [PATCH] fix(task): add error handling for when a `FinishRun` fails (#15845) --- task/backend/executor/task_executor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/task/backend/executor/task_executor.go b/task/backend/executor/task_executor.go index ccd3e0c8ea..1070d81c91 100644 --- a/task/backend/executor/task_executor.go +++ b/task/backend/executor/task_executor.go @@ -352,8 +352,9 @@ func (w *worker) finish(p *promise, rs backend.RunStatus, err error) { w.te.logger.Debug("Completed successfully", zap.String("taskID", p.task.ID.String())) } - w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID) - + if _, err := w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID); err != nil { + w.te.logger.Error("Failed to finish run", zap.String("taskID", p.task.ID.String()), zap.String("runID", p.run.ID.String()), zap.Error(err)) + } } func (w *worker) executeQuery(p *promise) {