argo-workflows: Expression results are printed incorrectly at random
Summary
The container prints out the result correctly (see the printed โ1โ below).
___
< 1 >
---
\
\
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
However, it sometimes (1 out of 5 times) prints out the raw expression instead (see {{=jsonpath(workflow.parameters.config, \ \ '$.a')}
below):
_________________________________________
/ {{=jsonpath(workflow.parameters.config, \
\ '$.a')}} /
-----------------------------------------
\
\
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
Reproducible workflow YAML:
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: hello-world-template
spec:
serviceAccountName: argo
templates:
- name: hello-world
inputs:
parameters:
- name: a
value: "{{=jsonpath(workflow.parameters.config, '$.a')}}"
- name: b
value: "{{=jsonpath(workflow.parameters.config, '$.b')}}"
- name: c
value: "{{=jsonpath(workflow.parameters.config, '$.c')}}"
container:
image: docker/whalesay
command: [cowsay]
args: ["{{inputs.parameters.a}}"]
---
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
spec:
serviceAccountName: argo
entrypoint: whalesay
arguments:
parameters:
- name: config
value: '{"a": "1", "b": "2", "c": "3"}'
templates:
- name: whalesay
steps:
- - name: hello-world
templateRef:
name: hello-world-template
template: hello-world
Diagnostics
๐ Yes! We need all of your diagnostics, please make sure you add it all, otherwise weโll go around in circles asking you for it:
What Kubernetes provider are you using?
k3d
What version of Argo Workflows are you running?
v3.2.0-rc1
What executor are you running? Docker/K8SAPI/Kubelet/PNS/Emissary
PNS
Did this work in a previous version? I.e. is it a regression?
Havenโt checked.
Message from the maintainers:
Impacted by this bug? Give it a ๐. We prioritise the issues with the most ๐.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 23 (23 by maintainers)
Commits related to this issue
- fix: Fix expression template random errors. #6673 Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix expression template random errors. Fixes #6673 (#6786) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix expression template random errors. Fixes #6673 (#6786) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix expression template random errors. Fixes #6673 (#6786) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix expression template random errors. Fixes #6673 (#6786) Signed-off-by: Alex Collins <alex_collins@intuit.com> Signed-off-by: kriti-sc <kathuriakriti1@gmail.com> — committed to kriti-sc/argo-workflows by alexec 3 years ago
Could be fixed by #6442, if this is quoting issue.
Could be related to #6285.