kubeflow / kfp-tekton

Kubeflow Pipelines on Tekton
https://developer.ibm.com/blogs/kubeflow-pipelines-with-tekton-and-watson/
Apache License 2.0
173 stars 123 forks source link

Pipeline count metrics not correct #951

Open ykoyfman opened 2 years ago

ykoyfman commented 2 years ago

/kind bug

What steps did you take and what happened:

Enabled metrics collection with

kubectl set env -n kubeflow deploy/ml-pipeline collectMetricsFlag=true

We're seeing our pipeline metrics not reflect the number of pipelines (and are often negative) - e.g. currently it's showing

# HELP pipeline_server_pipeline_count The current number of pipelines in Kubeflow Pipelines instance
# TYPE pipeline_server_pipeline_count gauge

pipeline_server_pipeline_count -77

When we have 13 pipelines.

What did you expect to happen:

Metric to accurately reflect pipeline counts after multiple adds/deletions.

Additional information: [Miscellaneous information that will assist in solving the issue.]

Environment:

OpenShift 4.10 installed from https://raw.githubusercontent.com/kubeflow/kfp-tekton/master/install/v1.2.0/kfp-tekton.yaml

Tomcli commented 2 years ago

The problem is that the metric value only incremented during pipeline create and pipeline upload. We need to make sure the metrics is reflecting the accurate number. https://github.com/kubeflow/kfp-tekton/blob/9307b361fcc005c7fc7b2c7376426f8a5a4ad01d/backend/src/apiserver/server/pipeline_server.go#L143-L145

ykoyfman commented 2 years ago

@Tomcli Any updates on prioritizing this fix? Thanks!