Uh oh!
There was an error while loading. Please reload this page.
Fix Prometheus Helm.status crash due to invalid chart_path argument - #126
Conversation
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a runtime crash in Prometheus telemetry initialization where Helm.status() was being called with incorrect parameters. The original code incorrectly passed the entire helm_configs dictionary (containing release_name, chart_path, and namespace) to Helm.status(), which only accepts release_name and namespace as positional parameters.
Changes:
- Modified
_is_prometheus_running()to callHelm.status()with explicit named parameters instead of unpacking the full helm_configs dictionary - Added a trailing newline at end of file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try: | ||
| status_output = Helm.status(**self.helm_configs) | ||
| status_output = Helm.status( | ||
| release_name=self.name, |
There was a problem hiding this comment.
The release_name parameter should use self.helm_configs["release_name"] instead of self.name. The self.name attribute is set to metadata["Name"] which is "Prometheus" (capitalized), while the actual Helm release name in helm_configs is "prometheus" (lowercase). Using self.name will cause Helm.status() to query for the wrong release name and fail to detect when Prometheus is running. This inconsistency with how Helm.install() and Helm.uninstall() use the release_name will lead to incorrect behavior.
| release_name=self.name, | |
| release_name=self.helm_configs["release_name"], |
Uh oh!
There was an error while loading. Please reload this page.
before fixed , the error after fixed , the error |
Jackson Clark (HacksonClark)
left a comment
There was a problem hiding this comment.
Thank you!
Uh oh!
There was an error while loading. Please reload this page.
This PR fixes a runtime crash in Prometheus telemetry initialization.
Prometheus._is_prometheus_running() was passing the full Helm install config
(including chart_path, values, timeout) into Helm.status(), which only accepts
release_name and namespace. This caused a TypeError and prevented Prometheus
from starting.
The fix calls Helm.status() with only the required parameters, restoring
correct Helm API usage and allowing AIOpsLab and Stratus evaluations to run
end-to-end.