canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
10 stars 9 forks source link

add the ability to stop service when database relations gone #11

Closed delgod closed 1 year ago

delgod commented 2 years ago

Issue

There no specific event in the requires library to handle the event of a relation being removed. Application charms can observer the relation departed/broken events, but that won't handle (or at least it would need more code to handle) all situations like, for example, aliased relations.

Solution

Context

Testing

Release Notes

delgod commented 1 year ago

The "database_requires" and "database_provides" libraries are now deprecated in favour of "data_interfaces", which should provide a more comprehensive framework to extend to other technologies beside databases. On this migration, the signature of "DatabaseRequires" and "DatabaseProvides" did not change. PR should be created for a new library.