Skip to content

Commit

Permalink
fix: removed error check which prevented deleting successful artGC wf…
Browse files Browse the repository at this point in the history
…s. (#9383)

fix: removed error check which prevented deleting successful artGC workflows

Signed-off-by: Dillen Padhiar <[email protected]>

Signed-off-by: Dillen Padhiar <[email protected]>
  • Loading branch information
dpadhiar authored Aug 17, 2022
1 parent 81e3d23 commit c756291
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions server/workflow/workflow_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ func (s *workflowServer) DeleteWorkflow(ctx context.Context, req *workflowpkg.Wo
if err != nil {
return nil, err
}
if wf.Finalizers != nil && !req.Force {
return nil, fmt.Errorf("%s has finalizer. Use argo delete --force to delete this workflow", wf.Name)
}
if req.Force {
_, err := auth.GetWfClient(ctx).ArgoprojV1alpha1().Workflows(wf.Namespace).Patch(ctx, wf.Name, types.MergePatchType, []byte("{\"metadata\":{\"finalizers\":null}}"), metav1.PatchOptions{})
if err != nil {
Expand Down

0 comments on commit c756291

Please sign in to comment.