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

  1. Add persist: true as a field to the bundle config for a delta bundle in config.yaml.
  2. Run OPA, and allow it to attempt to load the bundle.
  3. 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

Most upvoted comments

@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.