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

Pipelines as Code: Pipelinerun cleanup does not work when tweaking "max-keep-runs" annotation between different values

XMLWordPrintable

    • 3
    • False
    • None
    • False

      Description of problem:

      Pipelines as Code: Pipelinerun cleanup does not work when tweaking "max-keep-runs" annotation between different values.
      When tweaking the  "max-keep-runs" annotation between different values, the counter start from "0" instead of the number of runs which were there already.

      https://docs.openshift.com/pipelines/1.11/pac/managing-pipeline-runs-pac.html#cleaning-up-pipeline-run-using-pipelines-as-code_managing-pipeline-runs-pac

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

      1. Create a pipelinerun by setting annotation `pipelinesascode.tekton.dev/max-keep-runs: "3" `  
      2. Start 4 pipelineruns after each other. Cleanup works as expected
      3. Update the annotation by tweaking `pipelinesascode.tekton.dev/max-keep-runs: "5" `  
      4. Start 3 more pipelinerun to see if cleanup works → no cleanup happens
      5. Start 6 new pipelineruns to see a new cleanup

      Actual results:
      Need to start 6 new pipelines to see a cleanup happening. So we are not sure if this is a bug or not but when updating this value the counter start from "0 " instead of the number of runs which were there already.

      Expected results:
      Need to start only 3 more new pipelineruns to see a new cleanup as the "max-keep-runs" value was tweaked from 3 to 5. Counter should start from "4" as there were already 3 pipelineruns present. 

      Reproducibility (Always/Intermittent/Only Once):
      Always

      Acceptance criteria: 

       

      Definition of Done:

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

            Unassigned Unassigned
            rhn-support-gio Ginilekshmi A O
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: