-
Notifications
You must be signed in to change notification settings - Fork 825
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
Adds automatic population of unset retrypolicy field when starting Workflows #654
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1a14099
Initial checkin
mastermanu 0ecf466
adds default retry settings to general workflows
mastermanu b74d629
add unit tests for verification
mastermanu 6b792eb
fixes up some stuff
mastermanu 1f9ea16
fixes bug where workflowexpirationtime not being set for child workflows
mastermanu 905d57e
fixes unit tests
mastermanu 8879f75
fixes flaky tests
mastermanu 5748222
comments and misc cleanup
mastermanu a58170a
revert test timeout change
mastermanu c84cb6a
better fix for flaky test
mastermanu 33970e3
address PR feedback
mastermanu c0b8305
remove panic
mastermanu 144bc72
adds basic coverage of initializing the basic interval
mastermanu eb9eea4
Merge branch 'master' into add_child_retry
mastermanu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package common | ||
|
||
import "time" | ||
|
||
// DefaultRetrySettings indicates what the "default" retry settings | ||
// are if it is not specified on an Activity or for any unset fields | ||
// if a policy is explicitly set on a workflow | ||
type DefaultRetrySettings struct { | ||
InitialInterval time.Duration | ||
MaximumIntervalCoefficient float64 | ||
BackoffCoefficient float64 | ||
MaximumAttempts int32 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is it called
MaximumIntervalCoefficient
? I think we should just call itMaximumInterval
and use Duration as type.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.
We needed to initialize maximum interval in the case maximum interval was not set by the user, but a default maximum value might be less than the initial interval, which would then fail validation.
Btw, this change is already part of code-complete (this is just moving code around) and Maxim and I walked through this specific choice to use Coefficient vs. Interval before we landed this (it was initially an Interval).
Happy to discuss offline if we want to make further changes here though.