Skip to content

Commit

Permalink
chore: update charm libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
observability-noctua-bot committed Dec 19, 2024
1 parent 462ca77 commit 44fcb82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions lib/charms/tempo_coordinator_k8s/v0/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, *args):

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 3
LIBPATCH = 4

PYDEPS = ["pydantic"]

Expand Down Expand Up @@ -891,13 +891,15 @@ def _get_endpoint(
filter(lambda i: i.protocol.name == protocol, app_data.receivers)
)
if not receivers:
logger.error(f"no receiver found with protocol={protocol!r}")
# it can happen if the charm requests tracing protocols, but the relay (such as grafana-agent) isn't yet
# connected to the tracing backend. In this case, it's not an error the charm author can do anything about
logger.warning(f"no receiver found with protocol={protocol!r}.")
return
if len(receivers) > 1:
logger.error(
# if we have more than 1 receiver that matches, it shouldn't matter which receiver we'll be using.
logger.warning(
f"too many receivers with protocol={protocol!r}; using first one. Found: {receivers}"
)
return

receiver = receivers[0]
return receiver.url
Expand Down
4 changes: 2 additions & 2 deletions lib/charms/tls_certificates_interface/v3/tls_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _on_all_certificates_invalidated(self, event: AllCertificatesInvalidatedEven

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 23
LIBPATCH = 24

PYDEPS = ["cryptography", "jsonschema"]

Expand Down Expand Up @@ -526,7 +526,7 @@ def chain_as_pem(self) -> str:
class CertificateExpiringEvent(EventBase):
"""Charm Event triggered when a TLS certificate is almost expired."""

def __init__(self, handle, certificate: str, expiry: str):
def __init__(self, handle: Handle, certificate: str, expiry: str):
"""CertificateExpiringEvent.
Args:
Expand Down

0 comments on commit 44fcb82

Please sign in to comment.