Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(400)

Issue 6294065: environs: make AttemptStrategy public (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by dave
Modified:
12 years, 6 months ago
Reviewers:
mp+109744
Visibility:
Public.

Description

environs: make AttemptStrategy public I would like to reuse the AttemptStrategy code in the PA to implement a retry loop at the top level. After a short discussion on IRC, no good places for this code were found, but environs.AttemptStrategy appeared to be the least worse option until a better option arrives. https://code.launchpad.net/~dave-cheney/juju-core/go-juju-short-attempt/+merge/109744 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs: make AttemptStrategy public #

Total comments: 6

Patch Set 3 : environs: make AttemptStrategy public #

Total comments: 5

Patch Set 4 : environs: make AttemptStrategy public #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -45 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M environs/attempt.go View 1 2 3 1 chunk +22 lines, -20 lines 0 comments Download
M environs/attempt_test.go View 1 2 3 1 chunk +11 lines, -10 lines 0 comments Download
M environs/ec2/ec2.go View 6 chunks +11 lines, -11 lines 0 comments Download
M environs/ec2/export_test.go View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M environs/ec2/storage.go View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
dave_cheney.net
Please take a look.
12 years, 6 months ago (2012-06-11 22:41:09 UTC) #1
rog
LGTM modulo the below. i'm not that happy about cluttering up environs, but it really ...
12 years, 6 months ago (2012-06-12 08:12:30 UTC) #2
dave_cheney.net
Agreed the placement in the environs package is less than optimal. In discussions on IRC ...
12 years, 6 months ago (2012-06-12 08:20:34 UTC) #3
dave_cheney.net
Please take a look. https://codereview.appspot.com/6294065/diff/2001/environs/attempt.go File environs/attempt.go (right): https://codereview.appspot.com/6294065/diff/2001/environs/attempt.go#newcode14 environs/attempt.go:14: type attempt struct { On ...
12 years, 6 months ago (2012-06-12 22:53:38 UTC) #4
niemeyer
LGTM, with trivials: https://codereview.appspot.com/6294065/diff/2001/environs/attempt.go File environs/attempt.go (right): https://codereview.appspot.com/6294065/diff/2001/environs/attempt.go#newcode14 environs/attempt.go:14: type attempt struct { On 2012/06/12 ...
12 years, 6 months ago (2012-06-13 01:43:16 UTC) #5
dave_cheney.net
Thanks, I am having a bad day for typos, it is very cold in this ...
12 years, 6 months ago (2012-06-13 01:44:10 UTC) #6
dave_cheney.net
12 years, 6 months ago (2012-06-13 02:44:59 UTC) #7
*** Submitted:

environs: make AttemptStrategy public

I would like to reuse the AttemptStrategy code in the PA to 
implement a retry loop at the top level. After a short 
discussion on IRC, no good places for this code were found, 
but environs.AttemptStrategy appeared to be the least worse 
option until a better option arrives.

R=rog, niemeyer
CC=
https://codereview.appspot.com/6294065

https://codereview.appspot.com/6294065/diff/7001/environs/attempt.go
File environs/attempt.go (right):

https://codereview.appspot.com/6294065/diff/7001/environs/attempt.go#newcode27
environs/attempt.go:27: // false if not attempts remain.
On 2012/06/13 01:43:16, niemeyer wrote:
> // false if it's time to stop trying.
> 
> That seems more clear and fixes the "not attempts" typo.

Done.

https://codereview.appspot.com/6294065/diff/7001/environs/internal_test.go
File environs/internal_test.go (right):

https://codereview.appspot.com/6294065/diff/7001/environs/internal_test.go#ne...
environs/internal_test.go:1: package environs
On 2012/06/13 01:43:16, niemeyer wrote:
> package environs_test
> 
> and the wording below should be changed. There's no reason for this to be an
> internal suite anymore since we're dealing with public types.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b