Skip to content
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

fix: upgrade expr from 1.15.5 to 1.16.0. Fixes #12037 #12573

Merged
merged 14 commits into from
Jan 30, 2024
Merged
4 changes: 2 additions & 2 deletions api/jsonschema/schema.json

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

4 changes: 2 additions & 2 deletions api/openapi-spec/swagger.json

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

2 changes: 1 addition & 1 deletion docs/argo-server-sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ metadata:
# Must evaluate to a boolean.
# If you want an account to be the default to use, this rule can be "true".
# Details of the expression language are available in
# https://github.com/antonmedv/expr/blob/master/docs/language-definition.md.
# https://github.com/expr-lang/expr/blob/master/docs/language-definition.md.
workflows.argoproj.io/rbac-rule: "'admin' in groups"
# The precedence is used to determine which service account to use whe
# Precedence is an integer. It may be negative. If omitted, it defaults to "0".
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sourcing-and-transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ A `data` template must always contain a `source`. Current available sources:

A `data` template may contain any number of transformations (or zero). The transformations will be applied serially in order. Current available transformations:

* `expression`: an [`expr`](https://github.com/antonmedv/expr) expression. See language definition [here](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md). When defining `expr` expressions Argo will pass the available data to the environment as a variable called `data` (see example above).
* `expression`: an [`expr`](https://github.com/expr-lang/expr) expression. See language definition [here](https://github.com/expr-lang/expr/blob/master/docs/Language-Definition.md). When defining `expr` expressions Argo will pass the available data to the environment as a variable called `data` (see example above).

We understand that the `expression` transformation is limited. We intend to greatly expand the functionality of this template with our community's feedback. Please see the link at the top of this document to submit ideas or use cases for this feature.
2 changes: 1 addition & 1 deletion docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ requirements](https://kubernetes.io/docs/concepts/overview/working-with-objects/

Because the endpoint accepts any JSON data, it is the user's responsibility to write a suitable expression to correctly filter the events they are interested in. Therefore, DO NOT assume the existence of any fields, and guard against them using a nil check.

[Learn more about expression syntax](https://github.com/antonmedv/expr).
[Learn more about expression syntax](https://github.com/expr-lang/expr).

### Expression Environment

Expand Down
2 changes: 1 addition & 1 deletion docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -4837,7 +4837,7 @@ Cannot be updated.
|------|------|---------|:--------:| ------- |-------------|---------|
| configMapKeyRef | [ConfigMapKeySelector](#config-map-key-selector)| `ConfigMapKeySelector` | | | | |
| default | [AnyString](#any-string)| `AnyString` | | | | |
| event | string| `string` | | | Selector (https://github.com/antonmedv/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message` | |
| event | string| `string` | | | Selector (https://github.com/expr-lang/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message` | |
| expression | string| `string` | | | Expression, if defined, is evaluated to specify the value for the parameter | |
| jqFilter | string| `string` | | | JQFilter expression against the resource object in resource templates | |
| jsonPath | string| `string` | | | JSONPath of a resource to retrieve an output parameter value from in resource templates | |
Expand Down
2 changes: 1 addition & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,7 @@ ValueFrom describes a location in which to obtain the value to a parameter
|:----------:|:----------:|---------------|
|`configMapKeyRef`|[`ConfigMapKeySelector`](#configmapkeyselector)|ConfigMapKeyRef is configmap selector for input parameter configuration|
|`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`|
|`event`|`string`|Selector (https://github.com/expr-lang/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message`|
|`expression`|`string`|Expression, if defined, is evaluated to specify the value for the parameter|
|`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
2 changes: 1 addition & 1 deletion docs/retries.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
> v3.2 and after

You can also use `expression` to control retries. The `expression` field
accepts an [expr](https://github.com/antonmedv/expr) expression and has
accepts an [expr](https://github.com/expr-lang/expr) expression and has
access to the following variables:

- `lastRetry.exitCode`: The exit code of the last retry, or "-1" if not available
Expand Down
2 changes: 1 addition & 1 deletion docs/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The tag is substituted with the result of evaluating the tag as an expression.
Note that any hyphenated parameter names or step names will cause a parsing error. You can reference them by
indexing into the parameter or step map, e.g. `inputs.parameters['my-param']` or `steps['my-step'].outputs.result`.

[Learn about the expression syntax](https://github.com/antonmedv/expr/blob/master/docs/language-definition.md).
[Learn about the expression syntax](https://github.com/expr-lang/expr/blob/master/docs/language-definition.md).
agilgur5 marked this conversation as resolved.
Show resolved Hide resolved

#### Examples

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ require (
github.com/alibabacloud-go/tea v1.2.1
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/aliyun/credentials-go v1.3.2
github.com/antonmedv/expr v1.15.5
github.com/argoproj/argo-events v1.7.3
github.com/argoproj/pkg v0.13.7-0.20230901113346-235a5432ec98
github.com/blushft/go-diagrams v0.0.0-20201006005127-c78c821223d9
github.com/colinmarc/hdfs/v2 v2.4.0
github.com/coreos/go-oidc/v3 v3.9.0
github.com/doublerebel/bellows v0.0.0-20160303004610-f177d92a03d3
github.com/evanphx/json-patch v5.8.0+incompatible
github.com/expr-lang/expr v1.16.0
github.com/gavv/httpexpect/v2 v2.10.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-jose/go-jose/v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/antonmedv/expr v1.15.5 h1:y0Iz3cEwmpRz5/r3w4qQR0MfIqJGdGM1zbhD/v0G5Vg=
github.com/antonmedv/expr v1.15.5/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE=
github.com/argoproj/argo-events v1.7.3 h1:XiGnKCzRRQCI7sFCKw3RoeFUOR6IupfAJI9uUK7pnG8=
github.com/argoproj/argo-events v1.7.3/go.mod h1:YxDOXrveW52SDAeeTI93Wagkr4jt5DK0dA0juIdWDRw=
github.com/argoproj/pkg v0.13.7-0.20230901113346-235a5432ec98 h1:Y1wJVJePMad3LwH+OIX4cl9ND3251XUNxjgpxFRWmZs=
Expand Down Expand Up @@ -316,6 +314,8 @@ github.com/evilmonkeyinc/jsonpath v0.8.1 h1:W8K4t8u7aipkQE0hcTICGAdAN0Xph349Ltjg
github.com/evilmonkeyinc/jsonpath v0.8.1/go.mod h1:EQhs0ZsoD4uD56ZJbO30gMTfHLQ6DEa0/5rT5Ymy42s=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
github.com/expr-lang/expr v1.16.0 h1:BQabx+PbjsL2PEQwkJ4GIn3CcuUh8flduHhJ0lHjWwE=
github.com/expr-lang/expr v1.16.0/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ=
github.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi1wYT+niY=
github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc=
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type WorkflowEventBindingSpec struct {
}

type Event struct {
// Selector (https://github.com/antonmedv/expr) that we must must match the event. E.g. `payload.message == "test"`
// Selector (https://github.com/expr-lang/expr) that we must must match the event. E.g. `payload.message == "test"`
Selector string `json:"selector" protobuf:"bytes,1,opt,name=selector"`
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/workflow/v1alpha1/generated.proto

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

4 changes: 2 additions & 2 deletions pkg/apis/workflow/v1alpha1/openapi_generated.go

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/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ type ValueFrom struct {
// JQFilter expression against the resource object in resource templates
JQFilter string `json:"jqFilter,omitempty" protobuf:"bytes,3,opt,name=jqFilter"`

// Selector (https://github.com/antonmedv/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message`
// Selector (https://github.com/expr-lang/expr) that is evaluated against the event to get the value of the parameter. E.g. `payload.message`
Event string `json:"event,omitempty" protobuf:"bytes,7,opt,name=event"`

// Parameter reference to a step or dag task in which to retrieve an output parameter value from
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/executor/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4415,7 +4415,7 @@ definitions:
default:
$ref: '#/definitions/AnyString'
event:
description: Selector (https://github.com/antonmedv/expr) that is evaluated
description: Selector (https://github.com/expr-lang/expr) that is evaluated
against the event to get the value of the parameter. E.g. `payload.message`
type: string
expression:
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/client/docs/IoArgoprojWorkflowV1alpha1Event.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.

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

2 changes: 1 addition & 1 deletion sdks/python/client/docs/IoArgoprojWorkflowV1alpha1Event.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.

Loading
Loading