From 75d68b2b521636f19e5d4cf6e0ac7919658156f2 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Tue, 23 Jul 2019 12:11:01 +0200 Subject: [PATCH] runservice: stop run also if result is not set --- internal/services/runservice/action/action.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/services/runservice/action/action.go b/internal/services/runservice/action/action.go index 34c0609..2388d4b 100644 --- a/internal/services/runservice/action/action.go +++ b/internal/services/runservice/action/action.go @@ -120,10 +120,7 @@ func (h *ActionHandler) StopRun(ctx context.Context, req *RunStopRequest) error if r.Phase != types.RunPhaseRunning { return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase) } - if !r.Result.IsSet() { - // stop only if the result is not setted yet - r.Stop = true - } + r.Stop = true _, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt) return err