(ctx context.Context)
| 842 | } |
| 843 | |
| 844 | func (woc *wfOperationCtx) deleteTaskResults(ctx context.Context) error { |
| 845 | deletePropagationBackground := metav1.DeletePropagationBackground |
| 846 | return woc.controller.wfclientset.ArgoprojV1alpha1().WorkflowTaskResults(woc.wf.Namespace). |
| 847 | DeleteCollection( |
| 848 | ctx, |
| 849 | metav1.DeleteOptions{PropagationPolicy: &deletePropagationBackground}, |
| 850 | metav1.ListOptions{ |
| 851 | LabelSelector: common.LabelKeyWorkflow + "=" + woc.wf.Name, |
| 852 | // DeleteCollection does a "list" operation to get the resources to delete, which by default does a strongly consistent read of the most recent version. |
| 853 | // This can be slow for Kubernetes versions before 1.34, so we set resourceVersion=0 to relax consistency and tell the k8s API to return any resource version. |
| 854 | // It's possible for this to miss some resources, but those should be GC'd when the parent workflow is deleted. |
| 855 | ResourceVersion: "0", |
| 856 | }, |
| 857 | ) |
| 858 | } |
| 859 | |
| 860 | func (woc *wfOperationCtx) writeBackToInformer() error { |
| 861 | un, err := wfutil.ToUnstructured(woc.wf) |
no test coverage detected