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

Can no longer set maxRetention for results

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Ranked Issues

      Description of problem:

      Can no longer set maxRetention for results.  In Pipelines operator 1.20, we have deprecated the "maxRetention" and instead recommend to use "defaultRetention"

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

      Upgrade the pipelines operator to 1.20

      Steps to Reproduce

       # Try to set maxRetention via tekconconfig and notice that the controller still refers to the defaultRetention that was set by default with 1.20 operator.

       
      2025-11-01T16:00:00.003753954Z {"level":"info","ts":1762012800.0037036,"logger":"fallback","caller":"retention/job.go:47","msg":"retention job started at: 2025-11-01 16:00:00.003664189 +0000 UTC m=+88212.963357989, retention policy:

      {RunAt:*/30 * * * * DefaultRetention:720h0m0s Policies:[]}

      "}
      [anandpaladugu@localhost Downloads]$
      options:
      configMaps:
      tekton-results-config-results-retention-policy:
      data:
      defaultRetention: "720h"
      runAt: '*/30 * * * *'
       

      If you try to change the retention with "maxRetention", the it gets added below the  defaultRetention line in the configmap and the code below implies it always prioritizes defaultRetention first.
      if duration, ok := cfgMap[defaultRetention]; ok {
      v, err := ParseDuration(duration)
      if err != nil

      { return nil, fmt.Errorf("incorrect configuration for defaultRetention: %w", err) }

      rp.DefaultRetention = v
      } else if duration, ok := cfgMap[maxRetention]; ok {
      log.Println("WARNING: configuration key 'maxRetention' is deprecated; please use 'defaultRetention' instead.")
      v, err := ParseDuration(duration)
      if err != nil

      { return nil, fmt.Errorf("incorrect configuration for maxRetention: %w", err) }


      rp.DefaultRetention = v
      }
       

       

       

       

      Actual results:

      maxRetention no longer works after upgrading to operator v1.20

      Expected results:

      maxRetention should work as before. we have only deprecated it.

      Reproducibility (Always/Intermittent/Only Once):

      Always. Work around is to use defaultRetention in the tektonconfig, but customer would not know it unless they hit the issue and open a case.  The assumption (even if they read the release notes) is that deprecated features would continue to work untill removed.

       

              rh-ee-kbaig Khurram Baig
              anand.paladugu Anand Paladugu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: