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
9 stars 7 forks source link

[DESIGN] Secret fields shouldn't appear in the databag #151

Closed juditnovak closed 2 months ago

juditnovak commented 3 months ago

Currently (re-using the code from Cross-charm Relations) the pre-requested secret fields are saved in the databag.

They should be dynamically determined instead.

The overhead shouldn't be significatnt. True that this means that we need to get ALL secrets on the first occasion when the secret_fields attribute is referred to (which happens pretty much in all operations).

However since we strictly limit the the number of secrets being used, we'll probably have to fetch no more than 2-3 secrets from the Juju Secret Store. This should not mean a massive overhead.

github-actions[bot] commented 3 months ago

https://warthogs.atlassian.net/browse/DPE-3883

juditnovak commented 2 months ago

This ticket is implicitly gone by introducint DataPeerData and DataPeerUnitData -- the Peer Relation Data classes that do not add or remove anything from databags.

They can be used directly to handle all Peer Relation Data (secrets included).