Merge lp:~jcsackett/charmworld/multiple-appflowers into lp:charmworld
Status: | Merged |
---|---|
Approved by: | j.c.sackett |
Approved revision: | 454 |
Merged at revision: | 451 |
Proposed branch: | lp:~jcsackett/charmworld/multiple-appflowers |
Merge into: | lp:charmworld |
Diff against target: |
165 lines (+43/-46) 4 files modified
charmworld/models.py (+12/-5) charmworld/tests/test_models.py (+29/-10) charmworld/views/tests/test_tools.py (+0/-27) charmworld/views/tools.py (+2/-4) |
To merge this branch: | bzr merge lp:~jcsackett/charmworld/multiple-appflowers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Gui Bot | continuous-integration | Approve | |
Curtis Hovey (community) | code | Approve | |
Review via email: mp+194241@code.launchpad.net |
Commit message
Removes old-revision proof error charms from the review queue.
Description of the change
The linked bug reports a situation wherein a charm (appflower) is shown to have
proof errors but the actual charm page shows no errors. This is because we have
introduced versioned charms. The charm page uses the tip revision of any charm,
but CharmSource isn't actually really revision aware. This results in
find_proof_
a subsequent version has fixed the proof error.
One solution that was investigated was using the elastic search index to search
for proof charms, as it's only aware of the tip version of charms. However, the
only way to query for the existence of data, without trying to match on it, is
the "exists" filter, which cannot be used as proof is a json object, which
"exists" can't use. Equally, testing for the existence of proof.e fails, because
that is a list object--again a type that exists fails on.
We can however attempt to find the charm_id of a charm to test if it's in the
index; if it is, we can reliably say that is the tip.
charmworld/
-------
* _is_latest is added to CharmSource, which uses the index to test for the charm
id.
* find_proof_
charms.
* As a drive by, the undocumented "sub" feature is removed, making the code
simpler. This feature isn't used.
charmworld/
-------
* The "sub" feature, accessible only by url mangling, is removed. Addiitonally,
this entire view will be removed soon.
charmworld/
-------
A test for the new find_proof_
Thank you.