Merge lp:~adeuring/charmworld/check-charm-exists-in-store-1160527 into lp:~juju-jitsu/charmworld/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Abel Deuring | ||||
Approved revision: | 192 | ||||
Merged at revision: | 195 | ||||
Proposed branch: | lp:~adeuring/charmworld/check-charm-exists-in-store-1160527 | ||||
Merge into: | lp:~juju-jitsu/charmworld/trunk | ||||
Diff against target: |
162 lines (+57/-15) 3 files modified
charmworld/search.py (+11/-5) charmworld/test_search.py (+29/-0) charmworld/testing/factory.py (+17/-10) |
||||
To merge this branch: | bzr merge lp:~adeuring/charmworld/check-charm-exists-in-store-1160527 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | Approve | ||
Review via email: mp+158951@code.launchpad.net |
Commit message
return only charms without errors in search() and api_search() by default.
Description of the change
Return only valid charms in elasticsearch results.
For each (possible) charm it knows about, charmworld records its status
in the main charm store (store.
use this status information.
One important detail we ignored is if the charm store says that a given
charm is valid, or if it exists at all. We store this kind of status
information as a dictionary charm['
error, this dictionary has the key 'errors'.
This branch adds an additional elasticsearch filter to the "search
expression" used by ElasticSearchCl
ElasticSearchCl
are returned in search results. This behaviour can be changed by
setting the new parameter valid_charm_only to False.
As a drive-by fix, I changed the the conversion from a datetime instance
to "seconds since the Unix epoch" so that the local timezone is not
used. This fixes a failure of test_api.
that is not related to my changes.
On 2013/04/15 15:02:29, abel.deuring wrote:
> Please take a look.
lgtm
https:/ /codereview. appspot. com/8641044/