From 32ef5d859c92c1f9968def73c2d934f32fe3a501 Mon Sep 17 00:00:00 2001 From: andersonid Date: Mon, 29 Sep 2025 13:25:13 -0300 Subject: [PATCH] Fix: Remove prometheus_client parameter from historical analysis functions --- app/api/routes.py | 6 +++--- app/services/historical_analysis.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/routes.py b/app/api/routes.py index 700e75d..466b0d5 100644 --- a/app/api/routes.py +++ b/app/api/routes.py @@ -493,7 +493,7 @@ async def get_namespace_historical_analysis( # Get historical analysis for the namespace analysis = await historical_service.get_namespace_historical_analysis( - namespace, time_range, prometheus_client + namespace, time_range ) return { @@ -520,7 +520,7 @@ async def get_workload_historical_analysis( # Get historical analysis for the workload analysis = await historical_service.get_workload_historical_analysis( - namespace, workload, time_range, prometheus_client + namespace, workload, time_range ) return { @@ -548,7 +548,7 @@ async def get_pod_historical_analysis( # Get historical analysis for the pod analysis = await historical_service.get_pod_historical_analysis( - namespace, pod_name, time_range, prometheus_client + namespace, pod_name, time_range ) return { diff --git a/app/services/historical_analysis.py b/app/services/historical_analysis.py index 8c267c1..a71372d 100644 --- a/app/services/historical_analysis.py +++ b/app/services/historical_analysis.py @@ -444,7 +444,7 @@ class HistoricalAnalysisService: logger.error(f"Error getting historical summary: {e}") return {} - async def get_namespace_historical_analysis(self, namespace: str, time_range: str, prometheus_client): + async def get_namespace_historical_analysis(self, namespace: str, time_range: str): """Get historical analysis for a specific namespace""" try: logger.info(f"Getting historical analysis for namespace: {namespace}") @@ -570,7 +570,7 @@ class HistoricalAnalysisService: 'recommendations': [] } - async def get_workload_historical_analysis(self, namespace: str, workload: str, time_range: str, prometheus_client): + async def get_workload_historical_analysis(self, namespace: str, workload: str, time_range: str): """Get historical analysis for a specific workload/deployment""" try: logger.info(f"Getting historical analysis for workload: {workload} in namespace: {namespace}") @@ -740,7 +740,7 @@ class HistoricalAnalysisService: 'recommendations': [] } - async def get_pod_historical_analysis(self, namespace: str, pod_name: str, time_range: str, prometheus_client): + async def get_pod_historical_analysis(self, namespace: str, pod_name: str, time_range: str): """Get historical analysis for a specific pod""" try: logger.info(f"Getting historical analysis for pod: {pod_name} in namespace: {namespace}")