Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#16905 from SimonRichardson/fix-client-leaks
juju#16905 The cross-model remote secrets client would call a remote model to access secret information. Unfortunately, the client was never closed once it had made that request. Thus it would keep the connection alive and all of its resources alive preventing the clean up. As the client is actively working, the garbage collector wouldn't be able to clean up the resource (the monitor in the apiclient prevented that) and it would steadily grow, based on more usage. This fix is a relatively light touch, but the better approach would be to have a pool of connections to other models, keyed on the sourceUUID. We could think about implementing that in the future. <!-- Why this change is needed and what it does. --> ## Checklist <!-- If an item is not applicable, use `~strikethrough~`. --> - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing ## QA steps ```sh $ cd tests $ ./main.sh secrets_iaas ``` ## Links <!-- Link to all relevant specification, documentation, bug, issue or JIRA card. --> **Launchpad bug:** https://bugs.launchpad.net/juju/+bug/2052634 **Jira card:** JUJU-5422
- Loading branch information