Merge lp://qastaging/~ericsnowcurrently/landscape-charm/fix-upgrade-action-error-message into lp://qastaging/~landscape/landscape-charm/trunk

Proposed by Eric Snow
Status: Merged
Approved by: Eric Snow
Approved revision: 366
Merged at revision: 359
Proposed branch: lp://qastaging/~ericsnowcurrently/landscape-charm/fix-upgrade-action-error-message
Merge into: lp://qastaging/~landscape/landscape-charm/trunk
Diff against target: 415 lines (+267/-20)
6 files modified
lib/apt.py (+14/-13)
lib/tests/stubs.py (+11/-1)
lib/tests/test_apt.py (+5/-5)
lib/tests/test_upgrade.py (+58/-0)
lib/tests/test_utils.py (+127/-1)
lib/utils.py (+52/-0)
To merge this branch: bzr merge lp://qastaging/~ericsnowcurrently/landscape-charm/fix-upgrade-action-error-message
Reviewer Review Type Date Requested Status
Adam Collard (community) Approve
🤖 Landscape Builder test results Approve
Free Ekanayaka (community) Approve
Review via email: mp+299886@code.qastaging.launchpad.net

Commit message

Add logging to the Apt class and improve handling of failures.

Most notably, in the event of a failure a CharmError is not returned.
This causes actions and hooks to handle apt failures more appropriately.
The failures now have a more useful error message as well.

Testing instructions:

Description of the change

Add logging to the Apt class and improve handling of failures.

Most notably, in the event of a failure a CharmError is not returned.
This causes actions and hooks to handle apt failures more appropriately.
The failures now have a more useful error message as well.

Testing instructions:

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Looks good to me, I have mostly nits. +1

review: Approve
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Eric Snow (ericsnowcurrently) :
362. By Eric Snow

Follow precedent of importing attributes.

363. By Eric Snow

Add tests for CommandRunner.shell().

Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) :
Revision history for this message
Eric Snow (ericsnowcurrently) :
364. By Eric Snow

Use hookenv.DEBUG instead of adding DEBUG to the stub.

365. By Eric Snow

Use direct defaults rather than indirect ones.

Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) :
Revision history for this message
Adam Collard (adam-collard) wrote :

Nit inline, looks good though! +1

review: Approve
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Thanks for the review.

366. By Eric Snow

Set keys directly rather than using update().

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches