-
Notifications
You must be signed in to change notification settings - Fork 754
docs: add jobs overwrite flag #4646
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
Signed-off-by: Javier Aliaga <[email protected]>
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.
@javier-aliaga - Commented. A few things
-
Please put the code issue into the docs issue. I have added it in this case (Don't overwrite jobs using same name dapr#8402)
-
Let's use this PR to update docs overview here https://docs.dapr.io/developing-applications/building-blocks/jobs/jobs-overview/
- Under Features we really should say that the primary feature here is to create, get and delete jobs. This can be one paragraph, but in that paragraph you should mention that an existing job cannot be overwritten unless specific indicated. Write something and I will review this
- The first sentence here is now wrong I presume https://docs.dapr.io/developing-applications/building-blocks/jobs/jobs-overview/ under "Schedule jobs across multiple replicas" - where is says "When you create a job, it replaces any existing job with the same name." Should now say "When you create a job, it does not replace an existing job with the same name, unless you explicitly set the 'overwrite' flag"
- Remove the "waiting on code" label once this code is merged.
@@ -19,8 +19,7 @@ All jobs are registered with a case-sensitive job name. These names are intended | |||
interfacing with the Dapr runtime. The name is used as an identifier when creating and modifying the job as well as | |||
to indicate which job a triggered invocation is associated with. | |||
|
|||
Only one job can be associated with a name at any given time. Any attempt to create a new job using the same name | |||
as an existing job will result in an overwrite of this existing job. | |||
Only one job can be associated with a name at any given time. By default, any attempt to create a new job using the same name as an existing job will result in an error. However, if the `overwrite` flag is set to `true`, the new job will overwrite the existing job with the same name. |
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.
Only one job can be associated with a name at any given time. By default, any attempt to create a new job using the same name as an existing job will result in an error. However, if the `overwrite` flag is set to `true`, the new job will overwrite the existing job with the same name. | |
Only one job can be associated with a name at any given time. By default, any attempt to create a new job using the same name as an existing job results in an error. However, if the `overwrite` flag is set to `true`, the new job overwrites the existing job with the same name. |
@@ -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. | |||
`overwrite` | A boolean value to specify it the job can overwrite an existing one. Default value is `false` |
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.
`overwrite` | A boolean value to specify it the job can overwrite an existing one. Default value is `false` | |
`overwrite` | A boolean value to specify if the job can overwrite an existing one with the same name. Default value is `false` |
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
Issue reference
dapr/dapr#8402