opa-envoy-plugin
opa-envoy-plugin copied to clipboard
Issue 6901: set invalid request status if request parsing fails
Resolves open-policy-agent/opa#6901
@rudrakhp please squash your commits and we can get this in. Also have you tested this end-to-end?
@rudrakhp please squash your commits and we can get this in. Also have you tested this end-to-end?
I added a case for invalid URL in the e2e test suite, but somehow it's getting a 404 before 400 bad request. @ashutosh-narkar if you are aware of this do let me know, otherwise will come back to this tomorrow.
I added a case for invalid URL in the e2e test suite, but somehow it's getting a 404 before 400 bad request. @ashutosh-narkar if you are aware of this do let me know, otherwise will come back to this tomorrow.
Is the request even reaching OPA?
@rudrakhp did you get a chance to look into the test failures. This would be a good one to get in.
@rudrakhp did you get a chance to look into the test failures. This would be a good one to get in.
@ashutosh-narkar was out on vacation, will get something out in the next couple of days.
@ashutosh-narkar looks like the place where I was adding the test was for testing istio setup with the plugin enabled but requests were not going via OPA. I don't see any E2E suite where I can add this test, let me know if there is any. I think unit tests should suffice to test this behaviour as we rely on go-control-plane anyways. WDYT?
@rudrakhp this looks good. If you could just update the commit message with a note explaining the change that would be great. We can then get this in. Thanks for the contribution.
@ashutosh-narkar updated commit message