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

Virtual document cache not invalidated after with keyword processed #736

Closed
tsandall opened this issue May 11, 2018 · 0 comments
Closed
Labels

Comments

@tsandall
Copy link
Member

The virtual document cache is not being invalidated after the with keyword is processed. As a result, if the same rule is evaluated twice (once using with and again without using with) the second rule evaluation will return the result of the first. E.g.,

package x

p { input.x = 1 }
q { p with input as {"x": 1} }

Query: data.x

If OPA evaluates p after q the cache will not have been invalidated and the result will be {p: true, q: true}.

@tsandall tsandall added the bug label May 11, 2018
tsandall added a commit to tsandall/opa that referenced this issue May 11, 2018
The virtual document cache was not being invalidated. As a result, if
the same rule was evaluated twice where the first expression included a
with modifier, the result on the second evaluation may be incorrect.

Fixes open-policy-agent#736

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
tsandall added a commit that referenced this issue May 11, 2018
The virtual document cache was not being invalidated. As a result, if
the same rule was evaluated twice where the first expression included a
with modifier, the result on the second evaluation may be incorrect.

Fixes #736

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant