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

Sprig templating library is out of date #1042

Closed
tomgoren opened this issue Jan 28, 2021 · 1 comment
Closed

Sprig templating library is out of date #1042

tomgoren opened this issue Jan 28, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tomgoren
Copy link
Contributor

Describe the bug
argo-events uses Sprig v2.22.0 - this prevents us from using useful functions such as fromJson - which are necessary when utilizing SQS as an eventSource.

To Reproduce
Given a parameter in a SQS sensor defined as:

          parameters:
            - src:
                dependencyName: test-dep
                dataTemplate: "{{ index (.Input.body | b64dec | fromJson) \"myKey\" }}"
              dest: spec.arguments.parameters.0.value

Sending a message such as:

aws sqs send-message --queue-url https://sqs.<region>.amazonaws.com/<aws_account_id>/<queue_name> --message-body '{"myKey": "myValue"}'

Results in:

failed to execute the src event template, falling back to key or value. err: template: param:1: function "fromJson" not defined

Expected behavior
The value should be parsed and used to override the parameter defined in the trigger.

Environment (please complete the following information):

  • Kubernetes: v1.17.12-eks-7684af
  • Argo: v2.12.5
  • Argo Events: v1.2.2

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@tomgoren tomgoren added the bug Something isn't working label Jan 28, 2021
@tomgoren
Copy link
Contributor Author

This worked for us with a build based on #1043

@whynowy whynowy closed this as completed Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants