Previously, GrafanaCloudConfigRequirer would only emit a cloudconfig* event on relation changed/broken if this unit is a leader. This caused issues with multi-unit deployments as described in #12.
Solution
Since GrafanaCloudConfigRequirer only reads the relation remote's application_data, there is no need for a leadership guard because non-leader units have permission to read this data. The current commit removes these guards.
re doc changes: there is no usage documentation for the library atm :D I've raised this as #15
re lack of testing:
the repo has no testing for this library. The Provider at least gets imported by the charm, but the Requirer is not even imported elsewhere. I've raised an issue for this as #16
For this specific PR, I'll add tests as you suggested to capture the emitted events
Issue
Previously, GrafanaCloudConfigRequirer would only emit a cloudconfig* event on relation changed/broken if this unit is a leader. This caused issues with multi-unit deployments as described in #12.
Solution
Since GrafanaCloudConfigRequirer only reads the relation remote's application_data, there is no need for a leadership guard because non-leader units have permission to read this data. The current commit removes these guards.
Context
closes #12
Testing Instructions
See this grafana-agent patch for testing instructions
Release Notes