Skip to content

Commit

Permalink
docs: Clarify maxDuration behavior when used with activeDeadlineSecon…
Browse files Browse the repository at this point in the history
…ds. Fixes #13044 (#13068)
  • Loading branch information
leesungbin committed May 20, 2024
1 parent a1db80a commit 34ab2e3
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/jsonschema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,10 @@ the ReadOnly setting in VolumeMounts.
|------|------|---------|:--------:| ------- |-------------|---------|
| duration | string| `string` | | | Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") | |
| factor | [IntOrString](#int-or-string)| `IntOrString` | | | | |
| maxDuration | string| `string` | | | MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy | |
| maxDuration | string| `string` | | | MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy.
It is important to note that if the workflow template includes activeDeadlineSeconds, the pod's deadline is initially set with activeDeadlineSeconds.
However, when the workflow fails, the pod's deadline is then overridden by maxDuration.
This ensures that the workflow does not exceed the specified maximum duration when retries are involved. | |



Expand Down
2 changes: 1 addition & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ Backoff is a backoff strategy to use within retryStrategy
|:----------:|:----------:|---------------|
|`duration`|`string`|Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")|
|`factor`|[`IntOrString`](#intorstring)|Factor is a factor to multiply the base duration after each failed retry|
|`maxDuration`|`string`|MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy|
|`maxDuration`|`string`|MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy. It is important to note that if the workflow template includes activeDeadlineSeconds, the pod's deadline is initially set with activeDeadlineSeconds. However, when the workflow fails, the pod's deadline is then overridden by maxDuration. This ensures that the workflow does not exceed the specified maximum duration when retries are involved.|

## Mutex

Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/workflow/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pkg/apis/workflow/v1alpha1/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,10 @@ type Backoff struct {
Duration string `json:"duration,omitempty" protobuf:"varint,1,opt,name=duration"`
// Factor is a factor to multiply the base duration after each failed retry
Factor *intstr.IntOrString `json:"factor,omitempty" protobuf:"varint,2,opt,name=factor"`
// MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy
// MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy.
// It is important to note that if the workflow template includes activeDeadlineSeconds, the pod's deadline is initially set with activeDeadlineSeconds.
// However, when the workflow fails, the pod's deadline is then overridden by maxDuration.
// This ensures that the workflow does not exceed the specified maximum duration when retries are involved.
MaxDuration string `json:"maxDuration,omitempty" protobuf:"varint,3,opt,name=maxDuration"`
}

Expand Down
7 changes: 5 additions & 2 deletions pkg/plugins/executor/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,11 @@ definitions:
factor:
$ref: '#/definitions/IntOrString'
maxDuration:
description: MaxDuration is the maximum amount of time allowed for a workflow
in the backoff strategy
description: |-
MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy.
It is important to note that if the workflow template includes activeDeadlineSeconds, the pod's deadline is initially set with activeDeadlineSeconds.
However, when the workflow fails, the pod's deadline is then overridden by maxDuration.
This ensures that the workflow does not exceed the specified maximum duration when retries are involved.
type: string
type: object
BasicAuth:
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/client/docs/IoArgoprojWorkflowV1alpha1Backoff.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 34ab2e3

Please sign in to comment.