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

Metric tekton_pipelines_controller_running_pipelineruns includes non-running PipelineRuns

XMLWordPrintable

    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Fixed tekton_pipelines_controller_running_pipelineruns metric to exclude pending PipelineRuns, it now counts only running PipelineRuns
    • Bug Fix
    • Done
    • Pipelines Sprint Crookshank 35
    • Customer Reported

      Description of problem:

      The metric tekton_pipelines_controller_running_pipelineruns reports the number of Pipelines which have a Succeeded status of Unknown. This includes those in a Pending state and therefore not running

      Workaround:
      NA

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

      Steps to Reproduce

      1. Connect to a k8s cluster with Tekton installed and no PipelineRuns
      2. Observe the metric tekton_pipelines_controller_running_pipelineruns is 0 by port-forwarding with {{ kubectl port-forward -n tekton-pipelines services/tekton-pipelines-controller 9090:9090}} and fetching the metric with {{ curl localhost:9090/metrics -s | grep '^tekton_pipelines_controller_running_pipelineruns \d+'}}
      3. Create the following PipelineRun:

      apiVersion: tekton.dev/v1kind: PipelineRunmetadata: name: pipelinerun-is-pendingspec: status: "PipelineRunPending"pipelineSpec: tasks:

      • name: echo-good-morningtaskSpec: metadata: labels: app: "example"steps:
      • name: echoimage: mirror.gcr.io/ubuntuscript: | #Unable to render embedded object: File (/usr/bin/env bash echo "Good Morning) not found."
          # Observe the PipelineRun is not running
      1. Observe the metric tekton_pipelines_controller_running_pipelineruns reports 1

       

      Actual results:

      The metric tekton_pipelines_controller_running_pipelineruns reports the number of Pipelines which have a Succeeded status of Unknown. This includes those in a Pending state and therefore not running

      Expected results:

       

      The metric tekton_pipelines_controller_running_pipelineruns reports the number of Pipelines which are in a Running state

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

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

       

       *

              diagrawa Divyanshu Agrawal
              diagrawa Divyanshu Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: