Skip to content

Commit

Permalink
additional version bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-Robusta committed Jul 4, 2023
1 parent fc2f288 commit 14c4ae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ async def gather_data(
self.debug(f"Gathering data for {object} and {resource}")

MetricLoaderType = BaseMetricLoader.get_by_resource(resource, self.config.strategy)
await self.add_historic_pods(object, period)

metric_loader = MetricLoaderType(self.config, self.prometheus, self.executor)
return await metric_loader.load_data(object, period, step, self.name())

Expand Down
2 changes: 1 addition & 1 deletion robusta_krr/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def _gather_objects_recommendations(

async def _collect_result(self) -> Result:
clusters = await self._k8s_loader.list_clusters()
if len(clusters) > 1 and self.config.prometheus_url:
if clusters and len(clusters) > 1 and self.config.prometheus_url:
# this can only happen for multi-cluster querying a single centeralized prometheus
# In this scenario we dont yet support determining which metrics belong to which cluster so the reccomendation can be incorrect
raise ClusterNotSpecifiedException(
Expand Down

0 comments on commit 14c4ae5

Please sign in to comment.