-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
2
-
False
-
-
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
- Connect to a k8s cluster with Tekton installed and no PipelineRuns
- 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+'}}
- 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
- 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):
*
- is depended on by
-
RFE-7976 Get correct tekton pipelinerun count on the metrics
-
- Approved
-