-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Asserting every
domain is an iterable type before evaluation
#6763
Asserting every
domain is an iterable type before evaluation
#6763
Conversation
Fixes: open-policy-agent#6762 Signed-off-by: Johan Fylling <johan.dev@fylling.se>
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! 👍
return e.save(iter) | ||
} | ||
|
||
domain := e.e.closure(e.generator) | ||
if pd := e.e.bindings.Plug(e.Domain); pd != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 When would pd
be nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably never. Sometimes I'm guilty of writing a tad too defensive code 😄.
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
Adding `IsSetStmt`. Signed-off-by: Johan Fylling <johan.dev@fylling.se>
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you slept on it and still think it's an OK approach, let's merge it 🥳 Thanks for the quick fix.
Slept on it. No further epiphanies 😄. |
See open-policy-agent/opa#6763 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
See open-policy-agent/opa#6763 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
See open-policy-agent/opa#6763 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Fixes: #6762