-
Notifications
You must be signed in to change notification settings - Fork 765
Add documentation for the jobs failure policy #4676
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
base: v1.16
Are you sure you want to change the base?
Conversation
8ffe3db
to
17442bc
Compare
`failure_policy` specifies how the job should handle failures. | ||
|
||
It can be set to `constant` or `drop`. | ||
- The `constant` policy will retry the job up to `max_retries` times, with a delay of `interval` between retries. |
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.
Please add that if max_retries
is not set, it will retry forever.
@@ -37,6 +37,7 @@ Parameter | Description | |||
`dueTime` | An optional time at which the job should be active, or the "one shot" time, if other scheduling type fields are not provided. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from creation time), or non-repeating ISO8601. | |||
`repeats` | An optional number of times in which the job should be triggered. If not set, the job runs indefinitely or until expiration. | |||
`ttl` | An optional time to live or expiration of the job. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from job creation time), or non-repeating ISO8601. | |||
`failure_policy` | An optional failure policy for the job. Details of the format are below. |
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.
Add to this line what the default value is when unset.
Please can we add a new table with the full failure_policy
API definitions- add what the defaults are when fields are unset.
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.
Didn't add a table, but different bullet points for the two fields of the constant
policy. Do you think this is good enough? I find a table might be confusing given that there are two types of policies, and one of them doesn't have any configuration.
@JoshVanL shouldn't this PR target the |
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.
A few grammar changes.
@@ -37,6 +37,7 @@ Parameter | Description | |||
`dueTime` | An optional time at which the job should be active, or the "one shot" time, if other scheduling type fields are not provided. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from creation time), or non-repeating ISO8601. | |||
`repeats` | An optional number of times in which the job should be triggered. If not set, the job runs indefinitely or until expiration. | |||
`ttl` | An optional time to live or expiration of the job. Accepts a "point in time" string in the format of RFC3339, Go duration string (calculated from job creation time), or non-repeating ISO8601. | |||
`failure_policy` | An optional failure policy for the job. Details of the format are below. If not set, the job will be retried up to 3 times with a delay of 1 second between retries. |
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.
`failure_policy` | An optional failure policy for the job. Details of the format are below. If not set, the job will be retried up to 3 times with a delay of 1 second between retries. | |
`failure_policy` | An optional failure policy for the job. Details of the format are below. If not set, the job is retried up to 3 times with a delay of 1 second between retries. |
|
||
It can be set to `constant` or `drop`. | ||
- The `constant` policy will retry the job based on the configuration | ||
- `max_retries` configures how many times the job should be retried. Not setting this will make it retry indefinitely. |
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.
- `max_retries` configures how many times the job should be retried. Not setting this will make it retry indefinitely. | |
- `max_retries` configures how many times the job should be retried. Not setting this makes it retry indefinitely. |
`failure_policy` specifies how the job should handle failures. | ||
|
||
It can be set to `constant` or `drop`. | ||
- The `constant` policy will retry the job based on the configuration |
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.
- The `constant` policy will retry the job based on the configuration | |
- The `constant` policy retries the job based on the configuration |
Signed-off-by: Albert Callarisa <albert@diagrid.io>
…n the constant policy Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
17751d3
to
461c37f
Compare
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.
LGTM
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.
LGTM a couple of clarifications
`failure_policy` specifies how the job should handle failures. | ||
|
||
It can be set to `constant` or `drop`. | ||
- The `constant` policy retries the job based on the configuration. |
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.
- The `constant` policy retries the job based on the configuration. | |
- The `constant` policy retries the job constantly with the following configuration options. |
It can be set to `constant` or `drop`. | ||
- The `constant` policy retries the job based on the configuration. | ||
- `max_retries` configures how many times the job should be retried. Not setting this makes it retry indefinitely. | ||
- `interval` configures the delay between retries. Not setting this makes it retry immediately. |
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.
- `interval` configures the delay between retries. Not setting this makes it retry immediately. | |
- `interval` configures the delay between retries. Defaults to retrying immediately. Valid values are of the form `200ms`, `15s`, `2m`, etc. |
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.
Not sure if all these are valid but this is what we say for other retry policies: https://docs.dapr.io/operations/resiliency/policies/retries/retries-overview/#spec-metadata
|
||
It can be set to `constant` or `drop`. | ||
- The `constant` policy retries the job based on the configuration. | ||
- `max_retries` configures how many times the job should be retried. Not setting this makes it retry indefinitely. |
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.
- `max_retries` configures how many times the job should be retried. Not setting this makes it retry indefinitely. | |
- `max_retries` configures how many times the job should be retried. Defaults to retrying indefinitely. |
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.
Not sure if you can set -1 here or 0? If so them would add something like:
"-1 denotes an unlimited number of retries, while 0 means the request will not be retried."
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Document the use of FailurePolicy for jobs. This new field has been introduced in this PR
Issue reference