Skip to content

Commit

Permalink
remove debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Aug 20, 2024
1 parent 29d1c6e commit a6ac58e
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,11 @@ def _retry_on_condition(exception):
return True
return False


class PatchFailedError(Exception):
"""Raised when patching K8s resources requests and limits fails."""


class K8sResourcePatchFailedEvent(EventBase):
"""Emitted when patching fails."""

Expand Down Expand Up @@ -412,12 +414,6 @@ def is_ready(self, pod_name, resource_reqs: ResourceRequirements):
Returns:
bool: A boolean indicating if the service patch has been applied and is in effect.
"""
logger.debug(
"reqs=%s, templated=%s, actual=%s",
resource_reqs,
self.get_templated(),
self.get_actual(pod_name),
)
return self.is_patched(resource_reqs) and equals_canonically( # pyright: ignore
resource_reqs, self.get_actual(pod_name) # pyright: ignore
)
Expand All @@ -428,7 +424,7 @@ def apply(self, resource_reqs: ResourceRequirements) -> None:
# charm would be stuck in unknown/lost.
if self.is_patched(resource_reqs):
logger.debug(f"resource requests {resource_reqs} are already patched.")
return
return

self.client.patch(
StatefulSet,
Expand Down Expand Up @@ -550,7 +546,6 @@ def _patch(self) -> None:
logger.exception(msg)
raise PatchFailedError(msg) from e


except ValueError as e:
msg = f"Kubernetes resources patch failed: {e}"
logger.exception(msg)
Expand Down

0 comments on commit a6ac58e

Please sign in to comment.