Closed tonyandrewmeyer closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
19c37be
) 65.92% compared to head (dabd469
) 65.79%. Report is 8 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm not sure on the protocols here, sorry - am I meant to do an update of the libraries even though that's not required here? Happy to do so if that's the case.
It seems like this code has moved into data-platform-libs so this is now out-of-date.
Issue
When a secret is completely emptied of content, the lib removes all revisions from Juju, but leaves the cached object in place. This means that code can still access it, when in practice it has actually gone.
Solution
Remove the secret from the
SecretCache
when it's removed from Juju withremove_all_revisions()
. This does access a private attribute, but the comment just above this says that this code is temporary until the removal is in the lib itself, where the private attribute access would be fine.