Skip to content

Commit

Permalink
fix: bump grafana_cloud_integrator lib to fix issue with non-leader u…
Browse files Browse the repository at this point in the history
…nits
  • Loading branch information
ca-scribner committed Aug 14, 2024
1 parent 1c7d38c commit 48c81b2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/charms/grafana_cloud_integrator/v0/cloud_config_requirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,11 @@ def __init__(self, charm, relation_name = DEFAULT_RELATION_NAME):
self.framework.observe(event, self._on_relation_broken)

def _on_relation_changed(self, event):
if not self._charm.unit.is_leader():
return

self.on.cloud_config_available.emit() # pyright: ignore

def _on_relation_broken(self, event):
if not self._charm.unit.is_leader():
return

self.on.cloud_config_revoked.emit() # pyright: ignore

def _is_not_empty(self, s):
return bool(s and not s.isspace())

Expand Down Expand Up @@ -130,7 +124,7 @@ def prometheus_endpoint(self) -> dict:
"""Return the prometheus endpoint dict."""
if not self.prometheus_ready:
return {}

endpoint = {}
endpoint["url"] = self.prometheus_url
if self.credentials:
Expand Down

0 comments on commit 48c81b2

Please sign in to comment.