Skip to content

Commit

Permalink
chore: update charm libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Jan 5, 2024
1 parent dd83f21 commit c94bf59
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit c94bf59

Please sign in to comment.