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

Most upvoted comments

Could be fixed by #6442, if this is quoting issue.

Could be related to #6285.