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

Removing a bundle from discovery might cause panic at eval-time #5947

Closed
johanfylling opened this issue May 24, 2023 · 0 comments · Fixed by #5949
Closed

Removing a bundle from discovery might cause panic at eval-time #5947

johanfylling opened this issue May 24, 2023 · 0 comments · Fixed by #5949
Labels

Comments

@johanfylling
Copy link
Contributor

Given: a discovery bundle declares two bundles, a and b, where a depends on a function declared in b. If the discovery bundle is updated, and b is removed, a will fail to compile (as expected). This will however also have the following unexpected outcomes:

  1. When evaluation is triggered via the /v1/data/ endpoint, a panic will be encountered in the topdown evaluator.
    The HTTP request is terminated with an empty response.
  2. A request to /health?bundles will return a 200, and not the expected 500

This issue relates to #5917.

johanfylling added a commit to johanfylling/opa that referenced this issue May 24, 2023
johanfylling added a commit to johanfylling/opa that referenced this issue May 24, 2023
ashutosh-narkar pushed a commit to johanfylling/opa that referenced this issue May 25, 2023
johanfylling added a commit that referenced this issue May 25, 2023
johanfylling added a commit to johanfylling/opa that referenced this issue May 30, 2023
Fixes: open-policy-agent#5947
Signed-off-by: Johan Fylling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant