Closed ca-scribner closed 2 years ago
Whether it's a missing listen or an outdated comment remains to be seen. Thanks for reporting it, Andrew!
It was introduced by #4 but removed by #6.
Looking at _update_metrics_consumer_relation
it seems that all should work if we only observe relation-joined (instead of created). @rbarry82 ?
Actually it should work just as fine with relation-created, because it should fire for every newly related app, and we have a leader guard in place anyway, so there shouldn't be a difference between observing joined
and created
. @balbirthomas ?
Actually it should work just as fine with relation-created, because it should fire for every newly related app, and we have a leader guard in place anyway, so there shouldn't be a difference between observing
joined
andcreated
.
As mentioned in https://github.com/canonical/prometheus-scrape-config-k8s-operator/pull/4, both are needed for different circumstances.
@dstathis Would you have the bandwidth to pick this up ? Looks like the comments in question were added by Michele quite some time ago and may indeed be obsolete . Alternatively if you find they are still relevant it may just be a question of replacing the event binding with relation joined or even addition an additional event binding for relation joined as a robust measure.
This comment mentions
but only
relation_created
is observed. Maybe the comment is out of date?