lp:~reedobrien/charmworld/reindex_test

Created by Reed O'Brien and last modified
Get this branch:
bzr branch lp:~reedobrien/charmworld/reindex_test
Only Reed O'Brien can upload to this branch. If you are Reed O'Brien please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Reed O'Brien
Project:
charmworld
Status:
Merged

Recent revisions

511. By Reed O'Brien

remove extraneous commented code

510. By Reed O'Brien

use index client so we don't clobber existing charms index

fixes Bug #1317567

509. By Reed O'Brien

adds ngrams as multifield index to name. skips destructive test -- see Bug #1317567.

Approved by Juju Gui Bot, Richard Harding, j.c.sackett.

508. By Brad Crittenden

Include annotations in bundle search results.

The previous attempt at this problem was flawed in that API call for
getting bundles directly pulls from Mongo while search?text= and
search/interesting get results from ElasticSearch.

QA:

Load up some bundles with annotations:

bin/ingest-queued --prefix="~charmers/charms/precise/ntp"
bin/ingest-queued --prefix="~bac"

Change juju-gui to point to locally running charmworld:

diff --git a/app/config-debug.js b/app/config-debug.js
index 39daca6..f2c86b6 100644
--- a/app/config-debug.js
+++ b/app/config-debug.js
@@ -32,7 +32,10 @@ var juju_config = {
   // These are the main application config items used and passed down into all
   // SubApps.
   consoleEnabled: true,
+ //charmworldURL: 'https://manage.jujucharms.com/',
+ charmworldURL: 'http://127.0.0.1:2464/',

Run charmworld and juju-gui. In the GUI wait for the initial results to
load. These are the Featured charms and bundles.

Select the rails-scalable bundle. Note the layout in the inspector. Close
the inspector and then drag the bundle (using the name not the icon) to the
canvas. Note that the layout is the same as the preview.

https://codereview.appspot.com/91140045/

R=jcsackett.

Approved by Juju Gui Bot.

507. By Brad Crittenden

Add in annotations from mongo when returning search results from the API search.

Approved by Juju Gui Bot, j.c.sackett.

506. By Brad Crittenden

Handle old bundles in production.

Some bundles in production do not have promulgated flags. Process them
anyway.

https://codereview.appspot.com/90420044/

R=bac.

Approved by Juju Gui Bot.

505. By Brad Crittenden

Fix migration wrt invalid constraints.

The migration 026 for rewriting contraints to be space-separated worked for
staging. When run on production it had errors due to some of the bundles on
production being older than the more restrictive bundle proofing
requirements. Those bundles were in essence grandfathered in and never
subject to the stricter rules. At least one bundle had an obsolete 'cpu'
constraint and that caused the migration to fail since it was not checking for
the thrown ValueError in this situation.

The migration now checks for ValueError and will remove the affected bundle
from the target database and proceed.

The functions are now noted to throw ValueError.

Test was added for this situation and logging checked.

https://codereview.appspot.com/90420043/

R=jcsackett.

Approved by Juju Gui Bot.

504. By Brad Crittenden

Fix 026 exodus.

A basket, the thing ingested from Launchpad, contains one or more bundles. If
there are multiple bundles they may establish an inheritance relationship
between the bundles in that basket. The inheritance is done before the basket
is split into individual bundles and stored -- flattened in other words.

The 'inherits' line is not removed, however.

When the exodus happens, the re-use of 'store_bundles' attempts to flatten
again, but the relationship to the other bundle is invalid as the 'basket' now
just contains the one pre-processed bundle.

The fix for this exodus is to simply manually delete the 'inherits' key from
the bundle_data before proceeding.

The exodus has been tested against a full ingest of all charms and bundles.
The unit test has been modified to include an 'inherits' key in the data,
which is then ignored.

https://codereview.appspot.com/90300043/

R=jcsackett.

Approved by Juju Gui Bot.

503. By Brad Crittenden

Exodus to remove comma-sep constraints.

Comma-separated constraints in bundles are deprecated. Currently newly
processed bundles are converted to space-separated on ingestion but there are
a number of old bundles in the db that need fixing.

As this is an exodus, and only one can be present at a time, the 025 exodus is
deleted.

https://codereview.appspot.com/89770044/

R=jcsackett.

Approved by Juju Gui Bot.

502. By Brad Crittenden

Fix spurious error.

All fixes are:

Fix spurious test failure when version==0.

Print bundle revid in debug message.

Handle HTTPErrors from get_branch_tips and ValueErrors from parse_branch.

Move implicit parse_branch test from test_lp to an explicit one in
test_utils.

Add Cache-Control to Launchpad API call when getting branch tips. Also use
correct distribution name rather than alias.

https://codereview.appspot.com/88980043/

R=sinzui.

Approved by Juju Gui Bot.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:charmworld
This branch contains Public information 
Everyone can see this information.

Subscribers