Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion aiopslab/service/telemetry/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def _pvc_exists(self, pvc_name: str) -> bool:
def _is_prometheus_running(self) -> bool:
"""Check if Prometheus Helm release is deployed."""
try:
status_output = Helm.status(**self.helm_configs)
status_output = Helm.status(
release_name=self.name.lower(),
namespace=self.namespace,
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
namespace=self.namespace,
namespace=self.helm_configs["namespace"],

Copilot uses AI. Check for mistakes.
)
for line in status_output.splitlines():
if line.strip().startswith("STATUS:"):
status_value = line.split(":", 1)[1].strip().lower()
Expand All @@ -137,3 +140,4 @@ def _is_prometheus_running(self) -> bool:
except Exception as e:
logging.exception(f"Unexpected error while checking Prometheus status: {e}")
return False