Skip to content

Commit

Permalink
fix: Remove completed taskset status before mark worklfow complete. #…
Browse files Browse the repository at this point in the history
…12823

Signed-off-by: shuangkun <[email protected]>
  • Loading branch information
shuangkun committed Mar 22, 2024
1 parent 87899e5 commit a00697c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,12 @@ func (woc *wfOperationCtx) persistUpdates(ctx context.Context) {
}
}

// Remove completed taskset status before mark worklfow completed.
err = woc.removeCompletedTaskSetStatus(ctx)
if err != nil {
woc.log.WithError(err).Warn("error updating taskset")
}

wf, err := wfClient.Update(ctx, woc.wf, metav1.UpdateOptions{})
if err != nil {
woc.log.Warnf("Error updating workflow: %v %s", err, apierr.ReasonForError(err))
Expand Down Expand Up @@ -794,12 +800,6 @@ func (woc *wfOperationCtx) persistUpdates(ctx context.Context) {
time.Sleep(1 * time.Second)
}

err = woc.removeCompletedTaskSetStatus(ctx)

if err != nil {
woc.log.WithError(err).Warn("error updating taskset")
}

// Make sure the workflow completed.
if woc.wf.Status.Fulfilled() {
if err := woc.deleteTaskResults(ctx); err != nil {
Expand Down

0 comments on commit a00697c

Please sign in to comment.