Skip to content

Commit

Permalink
fix deep equal check failure in CreateOrUpdateWork(), by replace the …
Browse files Browse the repository at this point in the history
…marshaler

Signed-off-by: zach593 <[email protected]>
  • Loading branch information
zach593 committed Dec 11, 2024
1 parent a6df137 commit afc1a3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/helper/work.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package helper

import (
"context"
"encoding/json"
"fmt"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -54,7 +55,7 @@ func CreateOrUpdateWork(ctx context.Context, client client.Client, workMeta meta
}
}

workloadJSON, err := resource.MarshalJSON()
workloadJSON, err := json.Marshal(resource)
if err != nil {
klog.Errorf("Failed to marshal workload(%s/%s), error: %v", resource.GetNamespace(), resource.GetName(), err)
return err
Expand Down

0 comments on commit afc1a3c

Please sign in to comment.