forked from juju/juju
-
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#16696 from SimonRichardson/objects-get-request
juju#16696 Adds the ability to get an object of any type just by the path of the object. Currently, this is the storage path to the metadata, but conceivably it is the UUID of the object. This piggybacks off the current charm objects implementation. This is a raw endpoint and doesn't require checking of the underlying entity state. It's either in the object store or it isn't. This is required by the file object store to move into HA. The concept is simple; if you're in HA and you don't have the file locally, it's reasonable to ask another controller for that file. Upon receiving the file, it will store it locally, and send it back in the request. --- Interestingly, I now better understand how to fix the API server and remove a lot of complexity. The API Server should offer an endpoint register interface from the API server worker. Each handler can then register and unregister at will. It will provide resiliency for each handler. Failure at a handler doesn't bring down the whole API server. In addition, we can then move a lot of this mess out of the apiserver package into individual worker handlers. I'll look into creating a prototype for this in the new year. <!-- 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 $ go test -v ./apiserver -check.v -check.f=objects ``` ## Links **Jira card:** JUJU-5139
- Loading branch information
Showing
3 changed files
with
249 additions
and
64 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
Oops, something went wrong.