Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-10799

taskRuns deletion taking more time than specified in ttlSecondsAfterFinished in tektonpruner config

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      taskRuns deletion taking more time than specified in ttlSecondsAfterFinished in tektonpruner config

      Prerequisites (if any, like setup, operators/versions):

      **

      1. Install 1.21 OSP
      2. Disable old pruner & enable tektonpruner
      3. Create a new test namespace for testing taskRuns pruning

      Steps to Reproduce

      1. Keep ttlSecondsAfterFinished to 30s in tektonpruner config
      tektonpruner:
          disabled: false
          global-config:
            enforcedConfigLevel: global
            historyLimit: 100
            ttlSecondsAfterFinished: 30
          options: {} 
      1. Create task & taskRun files attached below
        [^task-for-pruner.yaml]
        [^taskrun-for-pruner.yaml]

      Actual results:

      TaskRuns are taking more than the configured time to be cleaned up
      **

      $ opc tr ls
      NAME                  STARTED          DURATION   STATUS
      echo-task-run-8l6gz   33 seconds ago   6s         Succeeded
      echo-task-run-jz25w   33 seconds ago   6s         Succeeded
      echo-task-run-x5zpj   33 seconds ago   7s         Succeeded
      echo-task-run-xsbgx   33 seconds ago   7s         Succeeded
      echo-task-run-cdznw   34 seconds ago   7s         Succeeded
      $ opc tr ls
      NAME                  STARTED        DURATION   STATUS
      echo-task-run-8l6gz   1 minute ago   6s         Succeeded
      echo-task-run-jz25w   1 minute ago   6s         Succeeded
      echo-task-run-x5zpj   1 minute ago   7s         Succeeded
      echo-task-run-xsbgx   1 minute ago   7s         Succeeded
      echo-task-run-cdznw   1 minute ago   7s         Succeeded
      $ opc tr ls
      NAME                  STARTED         DURATION   STATUS
      echo-task-run-8l6gz   2 minutes ago   6s         Succeeded
      echo-task-run-jz25w   2 minutes ago   6s         Succeeded
      echo-task-run-x5zpj   2 minutes ago   7s         Succeeded
      echo-task-run-xsbgx   2 minutes ago   7s         Succeeded
      echo-task-run-cdznw   2 minutes ago   7s         Succeeded
      $ opc tr ls
      No TaskRuns found
         

       

      Expected results:

      TaskRuns should be cleared after ttlSecondsAfterFinished time is completed and the taskRun is succeeded.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

      Observed reconcile error for taskRuns in chains-controller pod

      {"level":"error","ts":"2026-02-09T10:11:11.049Z","logger":"watcher","caller":"controller/controller.go:564","msg":"Reconcile error","commit":"0c9284f740d672930274efbe75033df55dc78515","knative.dev/controller":"github.com.tektoncd.chains.pkg.reconciler.taskrun.Reconciler","knative.dev/kind":"tekton.dev.TaskRun","knative.dev/traceid":"9fef8562-fcf2-4024-a0f6-924b496b3f14","knative.dev/key":"releasetest-rwqv6/echo-task-run-x5zpj","duration":0.028934765,"error":"failed to clear finalizers: Operation cannot be fulfilled on taskruns.tekton.dev \"echo-task-run-x5zpj\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"knative.dev/pkg/controller.(*Impl).handleErr\n\t/go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:564\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\t/go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:541\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\t/go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:489"}
       

      chains-controller-logs.log

       *

              rh-ee-anataraj Anitha Natarajan
              rh-ee-smanthin Sai Raju Manthina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: