DescriptionAddCharm required having the charm at hand when it was first called,
which meant the application would have to download the charm and
be ready to bundle it before even knowing if the charm was already
up-to-date or not.
This refactoring improves the situation by moving the charm importing
aspect onto a CharmPublisher, so when one is acquiring the charm
publisher from the store, it's already possible to tell if a charm
with the given URL and digest should not be imported, and not even
downloaded.
This change also simplfies other aspects. Now the whole importing
procedure sits within CharmPublisher.Publish, including publishing
of successful and failure events. There is still a reason to
publish failure events outside of the Publish method, but a lot
is being covered internally.
https://code.launchpad.net/~niemeyer/juju/store-charm-publisher/+merge/91336
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : store: refactored AddCharm into a CharmPublisher #Patch Set 3 : store: refactored AddCharm into a CharmPublisher #Patch Set 4 : store: refactored AddCharm into a CharmPublisher #
MessagesTotal messages: 5
|