robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations
MIT License
3.05k stars 160 forks source link

Cluster Label filtering issue #342

Closed waszakCeneo closed 1 month ago

waszakCeneo commented 1 month ago

When executing this command in powershell, and adding filter by cluster name i get this error I tried harcoding cluster name, but got the same issue. I am running latest version of KRR 1.13 and i tried running queries manually on prometheus, and after small changes it worked. I tried even putting clustername in '' but it doesn't accept input like that.

The name is correct, because when i put wrong cluster name, it returns list with cluster name with the cluster name I used before.

Executing Command: .\krr simple -p $prometheusUrl --prometheus-label cluster -l $clusterName --history_duration=72 --namespace deployments --resource deployment --use-oomkill-data -f json --logtostderr > result0.json

Exception occurred while prometheus_metrics_service.py:256 HTTP Status Code 400 {"status":"error","errorType":"bad_data","error":"invalid parameter \"query\": 2:58: parse error: unexpected \",\" in label matching, expected identifier or \"}\""}

arikalon1 commented 1 month ago

Thanks for reporting this @waszakCeneo

I think this is the same issue fixed on #327 We need to create a new release that includes it

arikalon1 commented 1 month ago

@waszakCeneo can you please upgrade to the latest release, v.1.15.0, and check if you have the same issue?

waszakCeneo commented 1 month ago

@arikalon1 thanks it works now. But found this error in debug mode on new version, but it doesn't break anything. So i will just leave it here

2024-09-25T06:22:54.0778622Z [08:22:54] DEBUG An error occurred while checking for a new runner.py:85 2024-09-25T06:22:54.0778864Z version
2024-09-25T06:22:54.0779019Z Traceback (most recent call last):
2024-09-25T06:22:54.0779622Z File "robusta_krr/core/runner.py", line 79,
2024-09-25T06:22:54.0779743Z in check_newer_version_available
2024-09-25T06:22:54.0779850Z File "robusta_krr/core/runner.py", line 75,
2024-09-25T06:22:54.0779955Z in
parse_version_string
2024-09-25T06:22:54.0780108Z ValueError: invalid literal for int() with base
2024-09-25T06:22:54.0780422Z 10: ''

arikalon1 commented 1 month ago

Thank you @waszakCeneo , I'll look into it