-
Notifications
You must be signed in to change notification settings - Fork 0
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#16525 from SimonRichardson/objectstore-everyw…
…here juju#16525 This PR uses the object store for resources and charm removals. This is a very mechanical, yet pervasive set of changes. The goal of this change and subsequent one to follow (agent tool binaries) is to make the object store an external dependency from the state package. Prior to this change, the `state/storage` package was just instantiated at the call site for when it wanted access to the gridfs store. Now that we have the object store as a dependency we need to weave it through everything to get access to it. This includes `Destroy` and `Remove` calls on certain entities. This kind of colours the function, so that you must always include the object store in these calls, but it does force you to recognise that when you destroy an entity there are blobs associated with those. There is an alternative; we could push the object store into state type when we pull it out of the state pool. The reason I went with the hard dependency model is it's explicit and it does help reduce the surface area of the state package. As per the API facade setup, you will get a shared object store per websocket connection that is tied to the model UUID. This will then be shared with other websocket connections that are associated with the same model UUID. This should reduce how many storage type instantiations we have per jujud request, as they're now loaned out. This will become more important when we implement file-backed storage. ## Checklist - [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 $ juju bootstrap lxd test --build-agent $ juju add-model default $ juju deploy ubuntu $ juju deploy juju-qa-test $ echo "boo" > foo-file.txt $ juju attach-resource juju-qa-test foo-file=./foo-file.txt $ juju show-status-log juju-qa-test/0 ``` ## Links **Jira card:** JUJU-4889
- Loading branch information
Showing
170 changed files
with
1,951 additions
and
1,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.