IngressPerUnitRequirer.url
should return a None on relation broken
#230
Labels
IngressPerUnitRequirer.url
should return a None on relation broken
#230
Bug Description
When I removed the relation between prometheus and traefik, I noticed that
web.external-url
still has the ingress path.This is because in prometheus we use
self.ingress.url
(IngressPerUnitRequirer.url
), which in turn uses_urls_from_relation_data
.However, on relation broken, relation data can be misleading.
traefik-k8s-operator/lib/charms/traefik_k8s/v1/ingress_per_unit.py
Lines 726 to 728 in f6b150f
Luckily, in
_handle_relation
, the requirer already has up to date information:All we need to do™ is also look at
self._stored.current_urls
insideIngressPerUnitRequirer.url
.To Reproduce
prom - trfk
.Environment
Juju 3.2.0. Latest charms.
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: