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

Unexpected token "OPERATOR" of value ">" #5677

Open
deaw0003 opened this issue Oct 28, 2024 · 2 comments · May be fixed by #7698
Open

Unexpected token "OPERATOR" of value ">" #5677

deaw0003 opened this issue Oct 28, 2024 · 2 comments · May be fixed by #7698
Assignees
Labels
area/docs Issues related to documentation, plugin examples, blueprints, and guides

Comments

@deaw0003
Copy link

deaw0003 commented Oct 28, 2024

Describe the issue

Unable to use Pebble functions--map, filter, and reduce--per documentation

# Applies a function to each element, resulting in [2, 4, 6].
map	{{ [1, 2, 3] | map(i => i * 2) }}

io.pebbletemplates.pebble.error.ParserException: Unexpected token "OPERATOR" of value ">" (map {{ [1, 2, 3] | map(i => i * 2) }}:1)
# Filters the list based on a predicate, resulting in [2, 3].
filter	{{ [1, 2, 3] | filter(i => i > 1) }}

io.pebbletemplates.pebble.error.ParserException: Unexpected token "OPERATOR" of value ">" (filter {{ [1, 2, 3] | filter(i => i > 1) }}:1)
# Reduces the list to a single value, resulting in 6.
reduce	{{ [1, 2, 3] | reduce((a, b) => a + b, 0) }}

io.pebbletemplates.pebble.error.ParserException: Unexpected token of value "," and type PUNCTUATION, expected token of type PUNCTUATION (reduce {{ [1, 2, 3] | reduce((a, b) => a + b, 0) }}:1)

image

Environment

  • Kestra Version: v0.19.5
  • Operating System (OS/Docker/Kubernetes): Docker
  • Java Version (if you don't run kestra in Docker): -
@deaw0003 deaw0003 added the bug Something isn't working label Oct 28, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Oct 28, 2024
@MilosPaunovic MilosPaunovic added the documentation Improvements or additions to documentation label Oct 28, 2024
@razuro
Copy link

razuro commented Feb 4, 2025

Hi @Ben8t is it possible to suggest someone that might be interested in working on this one?

@anna-geller anna-geller added area/docs Issues related to documentation, plugin examples, blueprints, and guides and removed bug Something isn't working documentation Improvements or additions to documentation labels Feb 10, 2025
@Ben8t Ben8t linked a pull request Mar 5, 2025 that will close this issue
@Ben8t
Copy link
Member

Ben8t commented Mar 5, 2025

After some search into Kestra source code and Pebble documentation, I can't find any reference to such functions (namely, filter, map and reduce).

PR opened to close this issue and fix documentation. #7698

Do not hesitate to open dedicated issues for new Pebble functions you want to see in Kestra.

@Ben8t Ben8t moved this from Backlog to In review in Issues Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Issues related to documentation, plugin examples, blueprints, and guides
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

5 participants