canonical / charms.reactive

Framework for developing charms and relations using the reactive pattern
Apache License 2.0
22 stars 34 forks source link

Fix application_name = None when single cluster relation #245

Closed javacruft closed 1 year ago

javacruft commented 1 year ago

When a cluster relation only has one member, the self.application_name property used when reading application databag returns None during a window of opportunity that is repeated every time a new hook runs. Subsequent handlers eventually set this property but the first handler that runs causes issues (in vault charm for example, by failing to get the current certs and then assuming they don't exist, therefore recreating certs every time update-status runs).