opa: Misleading storage_not_found_error when delta bundle uses persistence
Version Details
- Docker v4.17.0
- Image openpolicyagent/opa:latest-debug
Description
If persist: true
is set in the config for a delta bundle, OPA will throw the following error:
storage_not_found_error: <path>: document does not exist
.
This seems to be a slightly misleading or perhaps incomplete error, as it doesn’t provide much information or feedback to the user.
Steps To Reproduce
- Add
persist: true
as a field to the bundle config for a delta bundle inconfig.yaml
. - Run OPA, and allow it to attempt to load the bundle.
- See the
storage_not_found_error
in the logs.
Expected behavior
I would expect a more specific error, maybe one pointing out that not only is persist: true
not available for delta bundles, but is also invalid.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (17 by maintainers)
Commits related to this issue
- Fix for the issue when OPA throws misleading error (storage_not_found_error) message while loading the delta bundle when persist property in config is true. The fix is to prevent the loading of delta... — committed to yogisinha/opa by yogisinha a year ago
- Fix for the issue when OPA throws misleading error (storage_not_found_error) message while loading the delta bundle when persist property in config is true. The fix is to prevent the loading of delta... — committed to yogisinha/opa by yogisinha a year ago
- Fix for the issue when OPA throws misleading error (storage_not_found_error) message while loading the delta bundle when persist property in config is true. The fix is to prevent the loading of delta... — committed to yogisinha/opa by yogisinha a year ago
- Fix for the issue when OPA throws misleading error (storage_not_found_error) message while loading the delta bundle when persist property in config is true. The fix is to prevent the loading of delta... — committed to open-policy-agent/opa by yogisinha a year ago
- Fix for the issue when OPA throws misleading error (storage_not_found_error) message while loading the delta bundle when persist property in config is true. The fix is to prevent the loading of delta... — committed to superff/opa by yogisinha a year ago
@yogisinha Sounds correct to me
If you simply load a delta bundle and set
persist:true
in the config, you should be able to repro this.