Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry package #127

Merged
merged 2 commits into from
Dec 3, 2018
Merged

Add retry package #127

merged 2 commits into from
Dec 3, 2018

Conversation

bmoylan
Copy link
Contributor

@bmoylan bmoylan commented Dec 3, 2018

This change is Reviewable

@bmoylan bmoylan requested a review from nmiyake December 3, 2018 18:59
}

const (
defaultMaxAttempts = 0 // Infinite retries.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like this default value (it blocks forever), but worried that changing it would be a break when we have internal consumers move to this import.

Copy link
Contributor

@nmiyake nmiyake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor feedback on documentation, but content looks good. Feel free to merge once comment issues are addressed.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @bmoylan)


retry/retry.go, line 87 at r1 (raw file):

}

// Retrier allows to control retry loop.

Let's rephrase to correct grammar ("Retrier allows controlling a retry loop." or something else equivalent).


retry/retry.go, line 90 at r1 (raw file):

//
// Note that retry loop can be often replaced with simpler and less error-prone Do() function.
//

Remove empty comment line


retry/retry.go, line 189 at r1 (raw file):

Previously, bmoylan (Brad Moylan) wrote…

I do not like this default value (it blocks forever), but worried that changing it would be a break when we have internal consumers move to this import.

Yeah understand the downside, but I don't think this is unreasonable as a default and agree with the backcompat concerns.

Copy link
Contributor

@nmiyake nmiyake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving PR. Comment issues can be addressed as part of this PR or in a follow-up.

Copy link
Contributor Author

@bmoylan bmoylan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @nmiyake)


retry/retry.go, line 87 at r1 (raw file):

Previously, nmiyake (Nick Miyake) wrote…

Let's rephrase to correct grammar ("Retrier allows controlling a retry loop." or something else equivalent).

Done.


retry/retry.go, line 90 at r1 (raw file):

Previously, nmiyake (Nick Miyake) wrote…

Remove empty comment line

Done.

@bmoylan bmoylan merged commit 2e93cc1 into master Dec 3, 2018
@bmoylan bmoylan deleted the bm/retry branch December 3, 2018 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants