Skip to content

Commit

Permalink
feat(controller): Support withExpression for expanded steps. Fixes a…
Browse files Browse the repository at this point in the history
…rgoproj#4585

Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed Feb 14, 2021
1 parent a50ddb2 commit a50b581
Show file tree
Hide file tree
Showing 26 changed files with 851 additions and 504 deletions.
6 changes: 6 additions & 0 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3251,6 +3251,9 @@
"description": "When is an expression in which the task should conditionally execute",
"type": "string"
},
"withExpression": {
"type": "string"
},
"withItems": {
"description": "WithItems expands a task into multiple parallel tasks from the items in the list",
"items": {
Expand Down Expand Up @@ -5500,6 +5503,9 @@
"description": "When is an expression in which the step should conditionally execute",
"type": "string"
},
"withExpression": {
"type": "string"
},
"withItems": {
"description": "WithItems expands a step into multiple parallel steps from the items in the list",
"items": {
Expand Down
6 changes: 6 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6669,6 +6669,9 @@
"description": "When is an expression in which the task should conditionally execute",
"type": "string"
},
"withExpression": {
"type": "string"
},
"withItems": {
"description": "WithItems expands a task into multiple parallel tasks from the items in the list",
"type": "array",
Expand Down Expand Up @@ -8911,6 +8914,9 @@
"description": "When is an expression in which the step should conditionally execute",
"type": "string"
},
"withExpression": {
"type": "string"
},
"withItems": {
"description": "WithItems expands a step into multiple parallel steps from the items in the list",
"type": "array",
Expand Down
2 changes: 2 additions & 0 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,7 @@ WorkflowStep is a reference to a template to execute in a series of step
|`template`|`string`|Template is the name of the template to execute as the step|
|`templateRef`|[`TemplateRef`](#templateref)|TemplateRef is the reference to the template resource to execute as the step.|
|`when`|`string`|When is an expression in which the step should conditionally execute|
|`withExpression`|`string`|_No description available_|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a step into multiple parallel steps from the items in the list|
|`withParam`|`string`|WithParam expands a step into multiple parallel steps from the value in the parameter, which is expected to be a JSON list.|
|`withSequence`|[`Sequence`](#sequence)|WithSequence expands a step into a numeric sequence|
Expand Down Expand Up @@ -3619,6 +3620,7 @@ DAGTask represents a node in the graph during DAG execution
|`template`|`string`|Name of template to execute|
|`templateRef`|[`TemplateRef`](#templateref)|TemplateRef is the reference to the template resource to execute.|
|`when`|`string`|When is an expression in which the task should conditionally execute|
|`withExpression`|`string`|_No description available_|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a task into multiple parallel tasks from the items in the list|
|`withParam`|`string`|WithParam expands a task into multiple parallel tasks from the value in the parameter, which is expected to be a JSON list.|
|`withSequence`|[`Sequence`](#sequence)|WithSequence expands a task into a numeric sequence|
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
github.com/colinmarc/hdfs v1.1.4-0.20180805212432-9746310a4d31
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/doublerebel/bellows v0.0.0-20160303004610-f177d92a03d3
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/evanphx/json-patch v4.9.0+incompatible
github.com/fatih/structs v1.1.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZ
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s=
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/doublerebel/bellows v0.0.0-20160303004610-f177d92a03d3 h1:7nllYTGLnq4CqBL27lV6oNfXzM2tJ2mrKF8E+aBXOV0=
github.com/doublerebel/bellows v0.0.0-20160303004610-f177d92a03d3/go.mod h1:v/MTKot4he5oRHGirOYGN4/hEOONNnWtDBLAzllSGMw=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2395,6 +2395,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down
6 changes: 6 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2404,6 +2404,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down Expand Up @@ -9836,6 +9838,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down Expand Up @@ -15529,6 +15533,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2394,6 +2394,8 @@ spec:
type: object
when:
type: string
withExpression:
type: string
withItems:
items:
type: object
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ API rule violation: list_type_missing,github.com/argoproj/argo-workflows/v3/pkg/
API rule violation: list_type_missing,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,WorkflowSpec,Volumes
API rule violation: list_type_missing,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,WorkflowStatus,PersistentVolumeClaims
API rule violation: list_type_missing,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,WorkflowStep,WithItems
API rule violation: names_match,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,DAGTask,WithExpression
API rule violation: names_match,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,SubmitOpts,Entrypoint
API rule violation: names_match,github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1,WorkflowStatus,StoredWorkflowSpec
Loading

0 comments on commit a50b581

Please sign in to comment.