Merge lp://staging/~sinzui/charmworld/migrate-new-index into lp://staging/~juju-jitsu/charmworld/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | 386 | ||||
Merged at revision: | 387 | ||||
Proposed branch: | lp://staging/~sinzui/charmworld/migrate-new-index | ||||
Merge into: | lp://staging/~juju-jitsu/charmworld/trunk | ||||
Diff against target: |
79 lines (+25/-11) 2 files modified
charmworld/migrations/versions/018_delete_all_bundles.py (+11/-3) charmworld/migrations/versions/tests/test_migrations.py (+14/-8) |
||||
To merge this branch: | bzr merge lp://staging/~sinzui/charmworld/migrate-new-index | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | Approve | ||
Review via email: mp+184292@code.staging.launchpad.net |
Commit message
Update migration script to handle new deploys.
Description of the change
Update migration script to handle new deploys.
RULES
Pre-
* Update migration 18 to not fail when there is no ES index to update.
* Either look before acting, or recover from an IndexMissing error
QA
* Do a new deploy of apache, charmworld, elasticsearch and mongodb
* Verify all services start without error. The bug manifested itself
as a relation-error. The migration script was called when the db
and the index joined.
IMPLEMENTATION
* I used translate_error to adapt the ES failure and the script
treats IndexMissing as a success because there are no bundles
to delete.
* Note I had to add the index back at the end of the test to ensure
tear down succeeded. I could have instead replaced the setup
method with another method that each test calls to get a preexisting
ES.
Looks good.