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

Getting empty responses from OPA engine for no reason at all.. #3125

Closed
ParasharaRamesh opened this issue Feb 5, 2021 · 2 comments
Closed

Comments

@ParasharaRamesh
Copy link

ParasharaRamesh commented Feb 5, 2021

No description provided.

@tsandall
Copy link
Member

tsandall commented Feb 5, 2021

@ParasharaRamesh thanks for the detailed write up. The {} response to GET and POST requests (to /v1/data/<some_path>, I assume) indicates the requested document was undefined. The value could have been undefined for a couple reasons:

  1. The rules that generate the document at that path were not loaded.
  2. The rules that generate the document at the path were loaded but did not have a default value and could not be satisfied.

One way to debug this would to be to enable OPA's decision logging feature and see if you can reproduce the issue offline. The decision log will contain:

  • The value of the input document sent by the client
  • The response from OPA
  • The revision of the bundles loaded in OPA at the time when the decision was made

That should help narrow down the problem. Either:

  • Bundles you expect to be loaded are not
  • The rules you expect to generate values are not

Or, you are not able to reproduce the issue and it points to a runtime problem inside of OPA.

One other thing you could try is to enable provenance and tracing information on client queries:

e.g., POST /v1/data/a/b/c/d?provenance&explain=full&pretty=true.

Note: Full tracing can be expensive so depending on the request rate into OPA you might want to just use the fails explanation which might be enough.

@tsandall
Copy link
Member

Closing this issue as the original description has been removed.

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

No branches or pull requests

2 participants