Merge lp://staging/~chad.smith/charm-helpers/retry-add-apt-repository into lp://staging/charm-helpers

Proposed by Chad Smith
Status: Merged
Merged at revision: 705
Proposed branch: lp://staging/~chad.smith/charm-helpers/retry-add-apt-repository
Merge into: lp://staging/charm-helpers
Diff against target: 230 lines (+91/-39)
2 files modified
charmhelpers/fetch/ubuntu.py (+51/-31)
tests/fetch/test_fetch.py (+40/-8)
To merge this branch: bzr merge lp://staging/~chad.smith/charm-helpers/retry-add-apt-repository
Reviewer Review Type Date Requested Status
Eric Snow (community) Approve
David Britton (community) Approve
Review via email: mp+318951@code.staging.launchpad.net

Description of the change

Add 3 retries and logging messages to add-apt-repository attempts.

This branch involves some slight refactoring of _run_apt_command so that the common code _retry_command() can be reused by both _run_apt_command and add_source.

Note this branch also includes the local environment now in add-apt-repository calls which should also help in environments with proxy settings present.

To post a comment you must log in.
708. By Chad Smith

comment fix

Revision history for this message
David Britton (dpb) wrote :

Small nits inline. Code tests OK, lints OK. Thanks for the contribution. +1 with the small fixes addressed!

review: Approve
709. By Chad Smith

- rename -APT_NO_LOCK_RETRY_COUNT -> CMD_RETRY_COUNT
- Retry add-apt-repository CMD_RETRY_COUNT (30) times instead of 3
- update unit tests

710. By Chad Smith

lints

Revision history for this message
Eric Snow (ericsnowcurrently) :
review: Needs Fixing
Revision history for this message
Chad Smith (chad.smith) :
711. By Chad Smith

address review comments, sensible defaults, drop fatal from from _run_with_retries to simplify logic

Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Thanks! That's exactly how I was thinking it should look. :)

review: Approve

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