diff --git a/pkg/watcher/reconciler/dynamic/dynamic.go b/pkg/watcher/reconciler/dynamic/dynamic.go index 48e90eb4d..2e8fc8f38 100644 --- a/pkg/watcher/reconciler/dynamic/dynamic.go +++ b/pkg/watcher/reconciler/dynamic/dynamic.go @@ -722,10 +722,6 @@ func (r *Reconciler) addStoredAnnotations(ctx context.Context, o results.Object) return nil } - if r.cfg.GetCompletedResourceGracePeriod() != 0*time.Second { - logger.Debugf("Skipping CRD annotation patch: CompletedResourceGracePeriod is disabled ObjectName: %s", o.GetName()) - return nil - } if r.cfg.GetDisableAnnotationUpdate() { //nolint:gocritic logger.Debug("Skipping CRD annotation patch: annotation update is disabled") return nil diff --git a/pkg/watcher/reconciler/pipelinerun/reconciler.go b/pkg/watcher/reconciler/pipelinerun/reconciler.go index 0147e74d2..6036af5a7 100644 --- a/pkg/watcher/reconciler/pipelinerun/reconciler.go +++ b/pkg/watcher/reconciler/pipelinerun/reconciler.go @@ -144,12 +144,6 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, pr *pipelinev1.PipelineRu return nil } - // If the completed resource grace period isn't 0, we can't use finalizers - // to coordinate deletion because a results pruner is running. - if r.cfg.GetCompletedResourceGracePeriod() != 0*time.Second { - return nil - } - // Check to make sure the PipelineRun is finished. if !pr.IsDone() { logging.FromContext(ctx).Debugf("pipelinerun %s/%s is still running", pr.Namespace, pr.Name) diff --git a/pkg/watcher/reconciler/taskrun/reconciler.go b/pkg/watcher/reconciler/taskrun/reconciler.go index 5cf818506..473228e60 100644 --- a/pkg/watcher/reconciler/taskrun/reconciler.go +++ b/pkg/watcher/reconciler/taskrun/reconciler.go @@ -78,12 +78,6 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, tr *pipelinev1.TaskRun) k return nil } - // If the completed resource grace period isn't 0, we can't use finalizers - // to coordinate deletion because a results pruner is running. - if r.cfg.GetCompletedResourceGracePeriod() != 0*time.Second { - return nil - } - // Check the TaskRun has finished. if !tr.IsDone() { logging.FromContext(ctx).Debugf("taskrun %s/%s is still running", tr.Namespace, tr.Name) diff --git a/test/e2e/kustomize/watcher.yaml b/test/e2e/kustomize/watcher.yaml index 4f51f4634..c30220b5d 100644 --- a/test/e2e/kustomize/watcher.yaml +++ b/test/e2e/kustomize/watcher.yaml @@ -18,6 +18,18 @@ - op: add path: "/spec/template/spec/containers/0/args/-" value: "15s" +- op: add + path: "/spec/template/spec/containers/0/args/-" + value: "-store_deadline" +- op: add + path: "/spec/template/spec/containers/0/args/-" + value: "20s" +- op: add + path: "/spec/template/spec/containers/0/args/-" + value: "-forward_buffer" +- op: add + path: "/spec/template/spec/containers/0/args/-" + value: "17s" - op: add path: "/spec/template/spec/containers/0/args/-" value: "-store_event=true"