DescriptionMake queue and ingest handle prior charm revs.
In order to support multiple charm revisions, the queueing and ingest
processes must support older revisions of charms.
Up to 10 old revisions of a charm are queued up for ingesting. A charm that
is not the latest revision is not updated in the database if it already
exists. A current revision of the charm is updated even if it exists. This
updating may not be required as a charm cannot change without updating the
revision.
This branch is a continuation of Benji's work found at:
lp:~benji/charmworld/backfilling-first-cut
Notes on the adoption of the branch are at:
https://docs.google.com/a/canonical.com/document/d/1hGRugwNgwRLjV_uP7W8UYx1ejfKrU1RWw7NoNBPQOzQ
TODO:
* Make the number of revision configurable through charmworld.ini.
* Remove the charm reversal hack now that only the latest is updated.
QA:
% scripts/reset-db
% HOME=_run INI=charmworld.ini bin/enqueue --prefix=~charmers/charms/precise
% HOME=_run INI=charmworld.ini bin/ingest-queued
Redirect stderr from the above to a file 'stderr.txt'.
grep -c Queueing stderr.txt
grep -c Saving stderr.txt
should be equal to the mongo charm count:
% mongo juju
> db.charms.count()
Next, without resetting run
% HOME=_run INI=charmworld.ini bin/enqueue --prefix=~charmers/charms/precise
% HOME=_run INI=charmworld.ini bin/ingest-queued
grep -c Queueing stderr.txt
grep -c Saving stderr.txt
grep -c Skipping stderr.txt
should show some charms being skipped.
Note there is no support in the Charmworld UI for showing older charm
revisions yet.
https://code.launchpad.net/~bac/charmworld/backfilling/+merge/191731
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 12
MessagesTotal messages: 6
|