it is true that 'relation-ids' still lists the relation (as relation-broken is the last step before we remove it).
However, it is a little odd for the charm to decide to check "is the remote app telling me that this relation is happy" when we're telling you that the relation is going away.
I don't know exactly why ingress_per_unit is blindly iterating all relations, and not handling the case where you have a relation but the remote application is going away. Certainly it has relation-broken has always operated this way.
I'm guessing that at this point
File "/var/lib/juju/agents/unit-prometheus-k8s-0/charm/venv/sborl/relation.py", line 207, in _get_version
remote_versions_raw = relation.data[relation.app].get(VERSION_KEY)
By the time you get to 'relation-broken' the remote application has been removed from the relation (we are informing you that it has gone away).
If you look at 'relation-list' for that relation, the unit and the associated app has been removed.
source- relation- changed
.../charm# relation-ids source
source:1
.../charm# relation-list -r source:1
dummy-source/0
vs
source- relation- broken
.../charm# relation-ids source
source:1
.../charm# relation-list -r source:1
(no text)
it is true that 'relation-ids' still lists the relation (as relation-broken is the last step before we remove it).
However, it is a little odd for the charm to decide to check "is the remote app telling me that this relation is happy" when we're telling you that the relation is going away.
I don't know exactly why ingress_per_unit is blindly iterating all relations, and not handling the case where you have a relation but the remote application is going away. Certainly it has relation-broken has always operated this way. juju/agents/ unit-prometheus -k8s-0/ charm/venv/ sborl/relation. py", line 207, in _get_version versions_ raw = relation. data[relation. app].get( VERSION_ KEY)
I'm guessing that at this point
File "/var/lib/
remote_
relation.app is None (or maybe ""?)