From 31106f02e159a1f78403fcbcd76e3bdf9de1d278 Mon Sep 17 00:00:00 2001 From: Noctua Date: Fri, 5 Jan 2024 10:04:42 +0100 Subject: [PATCH] chore: update charm libraries (#558) Co-authored-by: Github Actions --- .../v0/kubernetes_compute_resources_patch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py b/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py index 62d6df29..a6ad4dfb 100644 --- a/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py +++ b/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py @@ -133,7 +133,7 @@ def setUp(self, *unused): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 5 +LIBPATCH = 6 _Decimal = Union[Decimal, float, str, int] # types that are potentially convertible to Decimal @@ -366,7 +366,7 @@ def is_patched(self, resource_reqs: ResourceRequirements) -> bool: """ return equals_canonically(self.get_templated(), resource_reqs) - def get_templated(self) -> ResourceRequirements: + def get_templated(self) -> Optional[ResourceRequirements]: """Returns the resource limits specified in the StatefulSet template.""" statefulset = self.client.get( StatefulSet, name=self.statefulset_name, namespace=self.namespace @@ -377,7 +377,7 @@ def get_templated(self) -> ResourceRequirements: ) return podspec_tpl.resources - def get_actual(self, pod_name: str) -> ResourceRequirements: + def get_actual(self, pod_name: str) -> Optional[ResourceRequirements]: """Return the resource limits that are in effect for the container in the given pod.""" pod = self.client.get(Pod, name=pod_name, namespace=self.namespace) podspec = self._get_container(