You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I got
*http: panic serving [::1]:61712: runtime error: invalid memory address or nil pointer dereference*
Here is my scenario:
• upload a simple policy curl -X PUT --data-binary @test.rego localhost:8181/v1/policies/test/state
Here is the content of the policy file:
``` package test.state
size = 3e+10```
• checked the data curl -X GET localhost:8181/v1/data/test/state, which returned {“result”:{“size”:3e+10}}
• tried to update the data curl -X PUT -H “Content-Type: application/json” --data-binary ‘{“size” : 4 }’ -i localhost:8181/v1/data/test/state
the request returned 204 without any content
• now, tried to check the data again curl -X GET -i localhost:8181/v1/data/test/state
the response was curl: (52) Empty reply from server
in the OPA server logs there was “http: panic” error, see logs below. (edited)
We were not catching merge failures when combining base and virtual
documents. As a result, a term with a nil value (which is invalid) was
being created and returned.
It's arguable that these kinds of conflicts should be caught when data
or policies are inserted. Alternatively, we should revisit whether
policy decisions should be obtained by querying the same root document
as raw data (e.g., decisions could be namespaced under a separate root
document.)
Fixesopen-policy-agent#601
We were not catching merge failures when combining base and virtual
documents. As a result, a term with a nil value (which is invalid) was
being created and returned.
It's arguable that these kinds of conflicts should be caught when data
or policies are inserted. Alternatively, we should revisit whether
policy decisions should be obtained by querying the same root document
as raw data (e.g., decisions could be namespaced under a separate root
document.)
Fixes#601
Reported by Alexey on Slack.
OPA logs:
Version:
The text was updated successfully, but these errors were encountered: