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

Using map in CEL panics the eventlistener #651

Closed
vdemeester opened this issue Jul 1, 2020 · 0 comments · Fixed by #652
Closed

Using map in CEL panics the eventlistener #651

vdemeester opened this issue Jul 1, 2020 · 0 comments · Fixed by #652
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vdemeester
Copy link
Member

vdemeester commented Jul 1, 2020

Expected Behavior

I can use map as defined in the language spec (see here).

Actual Behavior

It panics (used in the interceptor of an eventlistener at least)

Steps to Reproduce the Problem

The event json is a GitHub payload, body.pull_request.labels is a list with a map in, and that map contains name. The goal is to create a new "field" extensions.safe_labels that contains a list of label name (from body.pull_request.labels)

  1. Use the following interceptor
        - cel:
            overlays:
            - key: extensions.safe_labels
              expression: body.pull_request.labels.map(s, s['name'])
  1. See the eventlistener panic on events

Additional Info

/kind bug
/assign @bigkevmcd

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants