Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1145)

Issue 5616058: store: refactored AddCharm into a CharmPublisher

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by niemeyer
Modified:
12 years, 3 months ago
Reviewers:
mp+91336
Visibility:
Public.

Description

AddCharm 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -173 lines) Patch
M charm/url.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M store/store.go View 1 2 10 chunks +123 lines, -72 lines 0 comments Download
M store/store_test.go View 1 2 12 chunks +170 lines, -99 lines 0 comments Download

Messages

Total messages: 5
niemeyer
Please take a look.
12 years, 3 months ago (2012-02-02 19:22:49 UTC) #1
niemeyer
Please take a look.
12 years, 3 months ago (2012-02-02 19:24:58 UTC) #2
fwereade
LGTM, very nice.
12 years, 3 months ago (2012-02-07 17:01:03 UTC) #3
niemeyer
Please take a look.
12 years, 3 months ago (2012-02-07 17:58:28 UTC) #4
niemeyer
12 years, 3 months ago (2012-02-08 01:35:32 UTC) #5
*** Submitted:

store: refactored AddCharm into a CharmPublisher

AddCharm 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.

R=fwereade
CC=
https://codereview.appspot.com/5616058
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b