Merge lp://staging/~fwereade/pyjuju/fix-charm-upgrade into lp://staging/pyjuju
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Kapil Thangavelu | ||||
Approved revision: | 458 | ||||
Merged at revision: | 458 | ||||
Proposed branch: | lp://staging/~fwereade/pyjuju/fix-charm-upgrade | ||||
Merge into: | lp://staging/pyjuju | ||||
Prerequisite: | lp://staging/~fwereade/pyjuju/dont-stop-workflows | ||||
Diff against target: |
3535 lines (+1424/-808) 15 files modified
docs/source/internals/unit-agent-persistence.rst (+138/-0) juju/agents/tests/test_unit.py (+79/-141) juju/agents/unit.py (+59/-136) juju/control/tests/test_resolved.py (+16/-8) juju/control/tests/test_status.py (+11/-37) juju/control/tests/test_upgrade_charm.py (+4/-2) juju/errors.py (+11/-1) juju/lib/statemachine.py (+105/-28) juju/lib/tests/test_statemachine.py (+214/-76) juju/state/service.py (+10/-10) juju/tests/test_errors.py (+31/-9) juju/unit/lifecycle.py (+122/-24) juju/unit/tests/test_lifecycle.py (+121/-50) juju/unit/tests/test_workflow.py (+435/-227) juju/unit/workflow.py (+68/-59) |
||||
To merge this branch: | bzr merge lp://staging/~fwereade/pyjuju/fix-charm-upgrade | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu (community) | Approve | ||
Jim Baker (community) | Approve | ||
Review via email: mp+85271@code.staging.launchpad.net |
Description of the change
I'm pretty sure that charm upgrades will now:
* fail silently, as before, on early errors (when no changes have been made to any state apart from the upgrade flag)
* error out on early errors if recovering from an earlier failed operation (the *whole* *thing* needs to complete successfully...)
* induce charm_upgrade_error workflow states, when the workflow comes up in a "started" state but midway through a charm upgrade
* do the Right Thing re fire_hooks, which is to *ignore* fire_hooks in any invocation in which the charm is actually written to disk; in this case, it is vital to *always* fire the upgraded-charm hook, because we guarantee it's the *first* one fired after the operation completes.
* actually overwrite old charms, instead of just unpacking into the same directory (and thus leaving droppings).
+1, looks good to me. The only thing:
$ pep8 juju/unit tests/test_ lifecycle. py:830: 1: E303 too many blank lines (3) tests/test_ workflow. py:619: 80: E501 line too long (80 characters)
juju/unit/
juju/unit/