Skip to content

Commit

Permalink
fix(controller): Revert parameter value to *string. Fixes argoproj#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec authored Sep 11, 2020
1 parent 1387934 commit fd1465c
Show file tree
Hide file tree
Showing 35 changed files with 689 additions and 1,019 deletions.
6 changes: 3 additions & 3 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3121,7 +3121,7 @@
"properties": {
"default": {
"description": "Default is the default value to use for an input parameter if a value was not supplied",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
"type": "string"
},
"globalName": {
"description": "GlobalName exports an output parameter to the global scope, making it available as '{{io.argoproj.workflow.v1alpha1.outputs.parameters.XXXX}} and in workflow.status.outputs.parameters",
Expand All @@ -3133,7 +3133,7 @@
},
"value": {
"description": "Value is the literal value to use for the parameter. If specified in the context of an input parameter, the value takes precedence over any passed values",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
"type": "string"
},
"valueFrom": {
"description": "ValueFrom is the source for the output parameter's value",
Expand Down Expand Up @@ -4027,7 +4027,7 @@
"properties": {
"default": {
"description": "Default specifies a value to be used if retrieving the value from the specified source fails",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
"type": "string"
},
"event": {
"description": "Selector (https://github.com/antonmedv/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message`",
Expand Down
4 changes: 2 additions & 2 deletions api/openapi-spec/swagger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func TestSwagger(t *testing.T) {
t.Run("io.argoproj.workflow.v1alpha1.Parameter", func(t *testing.T) {
definition := definitions["io.argoproj.workflow.v1alpha1.Parameter"].(obj)
properties := definition["properties"].(obj)
assert.Equal(t, "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", properties["default"].(obj)["$ref"])
assert.Equal(t, "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", properties["value"].(obj)["$ref"])
assert.Equal(t, "string", properties["default"].(obj)["type"])
assert.Equal(t, "string", properties["value"].(obj)["type"])
})
t.Run("io.argoproj.workflow.v1alpha1.Histogram", func(t *testing.T) {
definition := definitions["io.argoproj.workflow.v1alpha1.Histogram"].(obj)
Expand Down
6 changes: 3 additions & 3 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -2252,10 +2252,10 @@ Parameter indicate a passed string parameter to a service template with an optio
### Fields
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`default`|[`IntOrString`](#intorstring)|Default is the default value to use for an input parameter if a value was not supplied|
|`default`|`string`|Default is the default value to use for an input parameter if a value was not supplied|
|`globalName`|`string`|GlobalName exports an output parameter to the global scope, making it available as '{{io.argoproj.workflow.v1alpha1.outputs.parameters.XXXX}} and in workflow.status.outputs.parameters|
|`name`|`string`|Name is the parameter name|
|`value`|[`IntOrString`](#intorstring)|Value is the literal value to use for the parameter. If specified in the context of an input parameter, the value takes precedence over any passed values|
|`value`|`string`|Value is the literal value to use for the parameter. If specified in the context of an input parameter, the value takes precedence over any passed values|
|`valueFrom`|[`ValueFrom`](#valuefrom)|ValueFrom is the source for the output parameter's value|

## Prometheus
Expand Down Expand Up @@ -3538,7 +3538,7 @@ ValueFrom describes a location in which to obtain the value to a parameter
### Fields
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`default`|[`IntOrString`](#intorstring)|Default specifies a value to be used if retrieving the value from the specified source fails|
|`default`|`string`|Default specifies a value to be used if retrieving the value from the specified source fails|
|`event`|`string`|Selector (https://github.com/antonmedv/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message`|
|`jqFilter`|`string`|JQFilter expression against the resource object in resource templates|
|`jsonPath`|`string`|JSONPath of a resource to retrieve an output parameter value from in resource templates|
Expand Down
6 changes: 3 additions & 3 deletions docs/swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,10 @@ Parameter indicate a passed string parameter to a service template with an optio

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| default | [io.k8s.apimachinery.pkg.util.intstr.IntOrString](#io.k8s.apimachinery.pkg.util.intstr.intorstring) | Default is the default value to use for an input parameter if a value was not supplied | No |
| default | string | Default is the default value to use for an input parameter if a value was not supplied | No |
| globalName | string | GlobalName exports an output parameter to the global scope, making it available as '{{io.argoproj.workflow.v1alpha1.outputs.parameters.XXXX}} and in workflow.status.outputs.parameters | No |
| name | string | Name is the parameter name | Yes |
| value | [io.k8s.apimachinery.pkg.util.intstr.IntOrString](#io.k8s.apimachinery.pkg.util.intstr.intorstring) | Value is the literal value to use for the parameter. If specified in the context of an input parameter, the value takes precedence over any passed values | No |
| value | string | Value is the literal value to use for the parameter. If specified in the context of an input parameter, the value takes precedence over any passed values | No |
| valueFrom | [io.argoproj.workflow.v1alpha1.ValueFrom](#io.argoproj.workflow.v1alpha1.valuefrom) | ValueFrom is the source for the output parameter's value | No |

#### io.argoproj.workflow.v1alpha1.PodGC
Expand Down Expand Up @@ -1612,7 +1612,7 @@ ValueFrom describes a location in which to obtain the value to a parameter

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| default | [io.k8s.apimachinery.pkg.util.intstr.IntOrString](#io.k8s.apimachinery.pkg.util.intstr.intorstring) | Default specifies a value to be used if retrieving the value from the specified source fails | No |
| default | string | Default specifies a value to be used if retrieving the value from the specified source fails | No |
| event | string | Selector (<https://github.com/antonmedv/expr>) that is evaluated against the event to get the value of the parameter. E.g. `payload.message` | No |
| jqFilter | string | JQFilter expression against the resource object in resource templates | No |
| jsonPath | string | JSONPath of a resource to retrieve an output parameter value from in resource templates | No |
Expand Down
75 changes: 15 additions & 60 deletions manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -585,26 +585,17 @@ spec:
items:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
globalName:
type: string
name:
type: string
value:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
valueFrom:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
event:
type: string
jqFilter:
Expand Down Expand Up @@ -1704,26 +1695,17 @@ spec:
items:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
globalName:
type: string
name:
type: string
value:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
valueFrom:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
event:
type: string
jqFilter:
Expand Down Expand Up @@ -2584,26 +2566,17 @@ spec:
items:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
globalName:
type: string
name:
type: string
value:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
valueFrom:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
event:
type: string
jqFilter:
Expand Down Expand Up @@ -3537,26 +3510,17 @@ spec:
items:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
globalName:
type: string
name:
type: string
value:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
valueFrom:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
event:
type: string
jqFilter:
Expand Down Expand Up @@ -3973,26 +3937,17 @@ spec:
items:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
globalName:
type: string
name:
type: string
value:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
valueFrom:
properties:
default:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: string
event:
type: string
jqFilter:
Expand Down
Loading

0 comments on commit fd1465c

Please sign in to comment.