Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions backend/charm/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ config:
description: The port to listen on for incoming HTTP requests.
type: int
hostname:
default: test-observer-api
description: Public hostname for the service.
type: string
frontend_hostname:
default: test-observer
description: Public hostname for the frontend connected to this API
type: string
sentry_dsn:
Expand Down Expand Up @@ -101,6 +99,8 @@ charm-libs:
version: "0"
- lib: prometheus_k8s.prometheus_scrape
version: "0"
- lib: traefik_k8s.ingress
version: "2"

requires:
database:
Expand All @@ -110,6 +110,9 @@ requires:
interface: nginx-route
redis:
interface: redis
ingress:
interface: ingress

provides:
test-observer-rest-api:
interface: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def _on_subject_requested(self, event: SubjectRequestedEvent):

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

PYDEPS = ["ops>=2.0.0"]

Expand Down Expand Up @@ -4275,6 +4275,14 @@ def _on_secret_changed_event(self, event: SecretChangedEvent):
if relation.app == self.charm.app:
logging.info("Secret changed event ignored for Secret Owner")

if relation.name != self.relation_data.relation_name:
logger.debug(
"Ignoring secret-changed from endpoint %s (expected %s)",
relation.name,
self.relation_data.relation_name,
)
return

remote_unit = None
for unit in relation.units:
if unit.app != self.charm.app:
Expand Down Expand Up @@ -5301,6 +5309,14 @@ def _on_secret_changed_event(self, event: SecretChangedEvent):
)
return

if relation.name != self.relation_data.relation_name:
logger.debug(
"Ignoring secret-changed from endpoint %s (expected %s)",
relation.name,
self.relation_data.relation_name,
)
return

if relation.app == self.charm.app:
logging.info("Secret changed event ignored for Secret Owner")

Expand Down Expand Up @@ -5563,6 +5579,14 @@ def _on_secret_changed_event(self, event: SecretChangedEvent):
)
return

if relation.name != self.relation_data.relation_name:
logger.debug(
"Ignoring secret-changed from endpoint %s (expected %s)",
relation.name,
self.relation_data.relation_name,
)
return

if relation.app == self.charm.app:
logging.info("Secret changed event ignored for Secret Owner")

Expand Down Expand Up @@ -5708,6 +5732,14 @@ def _on_secret_changed_event(self, event: SecretChangedEvent):
if relation.app == self.charm.app:
logging.info("Secret changed event ignored for Secret Owner")

if relation.name != self.relation_data.relation_name:
logger.debug(
"Ignoring secret-changed from endpoint %s (expected %s)",
relation.name,
self.relation_data.relation_name,
)
return

remote_unit = None
for unit in relation.units:
if unit.app != self.charm.app:
Expand Down
Loading
Loading