-
Notifications
You must be signed in to change notification settings - Fork 136
Fix Prometheus Helm.status crash due to invalid chart_path argument #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix Prometheus Helm.status crash due to invalid chart_path argument #126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"], |
| status_output = Helm.status(**self.helm_configs) | ||
| status_output = Helm.status( | ||
| release_name=self.name, | ||
| namespace=self.namespace, |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with how Helm.install() and Helm.uninstall() are called (using self.helm_configs), the namespace parameter should also use self.helm_configs["namespace"] instead of self.namespace. While both currently have the same value ("observe"), using helm_configs ensures all Helm operations use the same source of configuration and prevents potential inconsistencies if the metadata structure changes.
| namespace=self.namespace, | |
| namespace=self.helm_configs["namespace"], |
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.