-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: enable when expressions to use expr; add new json variables to avoid expr conflicts #9752
Closed
Closed
Changes from 65 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
e703d0b
chore(deps): bump docker/login-action from 1 to 2 (#1)
dependabot[bot] 559e049
chore(deps): bump docker/setup-buildx-action from 1 to 2 (#3)
dependabot[bot] 21f02d2
chore(deps): bump docker/setup-qemu-action from 1 to 2 (#4)
dependabot[bot] a18d932
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.24 to 7.0.26 …
dependabot[bot] f8a26d5
chore(deps): bump google.golang.org/api from 0.75.0 to 0.78.0 (#6)
dependabot[bot] baaa822
chore(deps): bump github.com/argoproj/pkg from 0.12.0 to 0.13.2 (#7)
dependabot[bot] 34255e6
chore(deps): bump google.golang.org/api from 0.78.0 to 0.79.0 (#8)
dependabot[bot] a66ff32
chore(deps): bump github.com/coreos/go-oidc/v3 from 3.1.0 to 3.2.0 (#9)
dependabot[bot] a7dc5d3
chore(deps): bump github.com/aliyun/aliyun-oss-go-sdk (#10)
dependabot[bot] d83da66
chore(deps): bump github.com/prometheus/client_golang (#11)
dependabot[bot] 25e6d08
chore(deps): bump google.golang.org/api from 0.79.0 to 0.80.0 (#12)
dependabot[bot] 77d1d99
chore(deps): bump cloud.google.com/go/storage from 1.22.0 to 1.22.1 (…
dependabot[bot] 2b45c8f
chore(deps): bump google.golang.org/api from 0.80.0 to 0.81.0 (#14)
dependabot[bot] d77801d
chore(deps): bump github.com/aliyun/aliyun-oss-go-sdk (#15)
dependabot[bot] 93735ed
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.26 to 7.0.27 …
dependabot[bot] 755e7ce
chore(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#17)
dependabot[bot] d3c2b07
chore(deps): bump google.golang.org/api from 0.81.0 to 0.82.0 (#18)
dependabot[bot] f4560b2
chore(deps): bump google.golang.org/api from 0.82.0 to 0.83.0 (#19)
dependabot[bot] cf48825
chore(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#20)
dependabot[bot] 0a56094
chore(deps): bump actions/setup-python from 3 to 4 (#21)
dependabot[bot] bc897f2
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.27 to 7.0.28 …
dependabot[bot] 8b119db
chore(deps): bump google.golang.org/api from 0.83.0 to 0.84.0 (#23)
dependabot[bot] f271e36
chore(deps): bump github.com/argoproj/pkg from 0.13.2 to 0.13.3 (#24)
dependabot[bot] f95fb4c
chore(deps): bump github.com/prometheus/common from 0.34.0 to 0.35.0 …
dependabot[bot] 1bc3dc1
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.28 to 7.0.29 …
dependabot[bot] 51a03f1
chore(deps): bump google.golang.org/api from 0.84.0 to 0.85.0 (#27)
dependabot[bot] 4996c01
chore(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#29)
dependabot[bot] 7d8e6d2
chore(deps): bump github.com/argoproj/pkg from 0.13.3 to 0.13.6 (#30)
dependabot[bot] 5996ff7
chore(deps): bump cloud.google.com/go/storage from 1.22.1 to 1.23.0 (…
dependabot[bot] e6f88aa
chore(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#32)
dependabot[bot] d4fbeac
chore(deps): bump google.golang.org/api from 0.85.0 to 0.86.0 (#33)
dependabot[bot] 0e1b600
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.29 to 7.0.30 …
dependabot[bot] b095170
chore(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#36)
dependabot[bot] bd66a3a
chore(deps): bump dependabot/fetch-metadata from 1.3.1 to 1.3.3 (#37)
dependabot[bot] 483ecff
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.30 to 7.0.31 …
dependabot[bot] 74a07d8
chore(deps): bump github.com/prometheus/common from 0.35.0 to 0.36.0 …
dependabot[bot] 526e14b
chore(deps): bump google.golang.org/api from 0.86.0 to 0.87.0 (#40)
dependabot[bot] e84003a
chore(deps): bump github.com/prometheus/common from 0.36.0 to 0.37.0 …
dependabot[bot] 9a6edfb
chore(deps): bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 (#42)
dependabot[bot] 56b7dc0
chore(deps): bump google.golang.org/api from 0.87.0 to 0.88.0 (#43)
dependabot[bot] a47fe88
chore(deps): bump cloud.google.com/go/storage from 1.23.0 to 1.24.0 (…
dependabot[bot] 1869eee
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.31 to 7.0.32 …
dependabot[bot] a4d7b5d
chore(deps): bump google.golang.org/api from 0.88.0 to 0.89.0 (#46)
dependabot[bot] 5424bd0
chore(deps): bump google.golang.org/api from 0.89.0 to 0.90.0 (#47)
dependabot[bot] bc524b4
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.32 to 7.0.33 …
dependabot[bot] 76195aa
chore(deps): bump google.golang.org/api from 0.90.0 to 0.91.0 (#49)
dependabot[bot] 12f51c1
chore(deps): bump github.com/minio/minio-go/v7 from 7.0.33 to 7.0.34 …
dependabot[bot] f5e68a1
chore(deps): bump github.com/tidwall/gjson from 1.14.1 to 1.14.2 (#51)
dependabot[bot] f1ca8b3
chore(deps): bump github.com/prometheus/client_golang (#52)
dependabot[bot] c3b2276
chore(deps): bump google.golang.org/api from 0.91.0 to 0.92.0 (#53)
dependabot[bot] 4f72f89
chore(deps): bump cloud.google.com/go/storage from 1.24.0 to 1.25.0 (…
dependabot[bot] 0bbfd78
chore(deps): bump google.golang.org/api from 0.92.0 to 0.93.0 (#55)
dependabot[bot] 680b877
chore(deps): bump github.com/argoproj-labs/argo-dataflow (#56)
dependabot[bot] d397eaf
chore(deps): bump github.com/tidwall/gjson from 1.14.2 to 1.14.3 (#57)
dependabot[bot] 3b88b6f
chore(deps): bump github.com/aliyun/aliyun-oss-go-sdk (#58)
dependabot[bot] 7a19a66
chore(deps): bump google.golang.org/api from 0.93.0 to 0.94.0 (#59)
dependabot[bot] 6cfdc26
chore(deps): bump cloud.google.com/go/storage from 1.25.0 to 1.26.0 (…
dependabot[bot] 88f2e1a
chore: put latest master of workflows onto my fork
juliev0 0cbcbfa
chore: update my fork with latest master
juliev0 d3c51c4
chore: updating to latest master
juliev0 c4d7ded
fix: remove error check for 'when' expressions using 'expr' and take …
juliev0 22a7451
chore: add test
juliev0 c32854b
fix: remove validation error for when expressions using expr
juliev0 493ccb0
chore: e2e
juliev0 9eef3c3
fix: empty commit
juliev0 1974e86
chore: comment
juliev0 8add8c9
chore: remove temporary print line
juliev0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
# Conditionals provide a way to affect the control flow of a | ||
# workflow at runtime, depending on parameters. In this example | ||
# the 'print-hello' template may or may not be executed depending | ||
# on the input parameter, 'should-print'. When submitted with: | ||
# the 'printHello' template may or may not be executed depending | ||
# on the input parameter, 'shouldPrint'. When submitted with: | ||
# argo submit examples/conditionals.yaml | ||
# the step will be skipped since 'should-print' will evaluate false. | ||
# the step will be skipped since 'shouldPrint' will evaluate false. | ||
# When submitted with: | ||
# argo submit examples/conditionals.yaml -p should-print=true | ||
# the step will be executed since 'should-print' will evaluate true. | ||
# argo submit examples/conditionals.yaml -p shouldPrint=true | ||
# the step will be executed since 'shouldPrint' will evaluate true. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: conditional- | ||
spec: | ||
entrypoint: conditional-example | ||
entrypoint: conditionalExample | ||
arguments: | ||
parameters: | ||
- name: should-print | ||
value: "false" | ||
- name: shouldPrint | ||
value: "true" | ||
|
||
templates: | ||
- name: conditional-example | ||
- name: conditionalExample | ||
inputs: | ||
parameters: | ||
- name: should-print | ||
- name: shouldPrint | ||
steps: | ||
- - name: print-hello | ||
template: whalesay | ||
when: "{{inputs.parameters.should-print}} == true" | ||
- - name: printHello-govaluate | ||
template: argosay | ||
when: "{{inputs.parameters.shouldPrint}} == true" # govaluate form | ||
- name: printHello-expr | ||
template: argosay | ||
when: "{{= inputs.parameters.shouldPrint == 'true'}}" # expr form | ||
- name: printHello-expr-json | ||
template: argosay | ||
when: "{{=jsonpath(workflow.parameters.json, '$[0].value') == 'true'}}" # expr form | ||
|
||
- name: whalesay | ||
- name: argosay | ||
container: | ||
image: docker/whalesay:latest | ||
image: argoproj/argosay:v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. had to change the whalesay image to argosay image since apparently whalesay isn't supposed to be used for e2e tests |
||
command: [sh, -c] | ||
args: ["cowsay hello"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
|
||
metadata: | ||
generateName: json-variables- | ||
|
||
labels: | ||
myLabel: myLabelValue | ||
annotations: | ||
myAnnotation: myAnnotationValue | ||
spec: | ||
entrypoint: argosay1 | ||
arguments: | ||
parameters: | ||
- name: myParam | ||
value: myParamValue | ||
|
||
templates: | ||
- name: argosay1 | ||
container: | ||
image: argoproj/argosay:v1 | ||
command: [echo] | ||
args: | ||
- "{{=jsonpath(workflow.labels.json, '$.myLabel')}}" | ||
- "{{=jsonpath(workflow.annotations.json, '$.myAnnotation')}}" | ||
- "{{=jsonpath(workflow.parameters.json, '$[0].value')}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
removed the dash from the name since expr expressions which include dash need to be formatted with brackets due to the special character