Skip to content

Commit

Permalink
fix: patch workflow status to workflow (#8265)
Browse files Browse the repository at this point in the history
Signed-off-by: wujayway <wujayway@gmail.com>
  • Loading branch information
wujayway authored Mar 28, 2022
1 parent f48998c commit 78f01f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions workflow/controller/taskset.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"strconv"

apierr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -173,6 +174,11 @@ func (woc *wfOperationCtx) createTaskSet(ctx context.Context) error {
if apierr.IsConflict(err) || apierr.IsAlreadyExists(err) {
woc.log.Debug("patching the exiting taskset")
spec := map[string]interface{}{
"metadata": metav1.ObjectMeta{
Labels: map[string]string{
common.LabelKeyCompleted: strconv.FormatBool(woc.wf.Status.Fulfilled()),
},
},
"spec": wfv1.WorkflowTaskSetSpec{Tasks: woc.taskSet},
}
// patch the new templates into taskset
Expand Down

0 comments on commit 78f01f2

Please sign in to comment.