canonical / grafana-k8s-operator

This charmed operator automates the operational procedures of running Grafana, an open-source visualization toolkit, on Kubernetes.
https://charmhub.io/grafana-k8s
Apache License 2.0
6 stars 23 forks source link

do not raise on missing peer relation when being destroyed #293

Closed PietroPasotti closed 5 months ago

PietroPasotti commented 5 months ago

Issue

Some codepaths try and access peer relation data without checking that a peer relation exists; when the app is being nuked, this raises resulting in #292

Fixes #292

Also I noticed there were a few inconsistencies in the assumed return type of get_peer_data, so I fixed those as well.

added a scenario test to catch this case