-
Notifications
You must be signed in to change notification settings - Fork 216
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
Allow client to suggest delay until next retry #1319
Conversation
c180126
to
07f31b0
Compare
d5e4f14
to
fcf630e
Compare
fcf630e
to
44773e2
Compare
# Conflicts: # go.mod # internal/cmd/build/go.mod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I love the simplicity. Some minor things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, only one minor thing about proto nil and I can mark approved
@@ -523,6 +548,8 @@ func (e *ApplicationError) Unwrap() error { | |||
return e.cause | |||
} | |||
|
|||
func (e *ApplicationError) NextRetryDelay() time.Duration { return e.nextRetryDelay } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have godoc, but not that big of a deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am failing to find documentation which will explain NextRetryDelay better than the name of the method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godoc rules often stipulate Godoc for all exported items regardless of obviousness (yes that means usually if redundant). Granted we don't have such a strict requirement, but we usually follow it.
What was changed
A new error type was introduced, which allows requesting next retry interval from an activity.
Why?
Allow developers to adjust retry interval on specific errors.
Checklist
Closes 1858
How was this tested:
Created a workflow/activity. Activity would return the new error with the retry interval. Verified that the value was received by the server.
Any docs updates needed?
The new error should be documented in the developer's guide.