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

field selection with ? on null now produces an error #937

Closed
1 of 3 tasks
mtaufen opened this issue Apr 26, 2024 · 1 comment · Fixed by #938
Closed
1 of 3 tasks

field selection with ? on null now produces an error #937

mtaufen opened this issue Apr 26, 2024 · 1 comment · Fixed by #938
Assignees

Comments

@mtaufen
Copy link

mtaufen commented Apr 26, 2024

Describe the bug
I think this change happened in #922.

For example, given yaml like:

foo:
  bar: null

and CEL like:

foo.?bar.?baz.orValue("not there")

behavior changes from returning "not there" to throwing a no such key error.

To Reproduce
Check which components this affects:

  • parser
  • checker
  • interpreter

Expected behavior
Expected "not there" to be returned.

Additional context

I tried reverting the change from #922 and it makes things work the way I expect.

@TristonianJones
Copy link
Collaborator

Thanks for the report. I'll give it a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants