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

Fix for the issue when OPA throws misleading error (storage_not_found_error) #6007

Conversation

yogisinha
Copy link
Contributor

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 bundle when persist is true and give a more clear error message.

One Test function included TestReadWithPatchPersistProperty

Fixes #5959

Why the changes in this PR are needed?

a new persist property is created in Reader struct in bundle.go
WithBundlePersistence method is created on Reader
from download , this property is set in Reader
persist property is checked in Read() method to throw the error for delta bundles.

@yogisinha
Copy link
Contributor Author

@anderseknert Hi, now the DCO check is passing.

…_error) message while loading the delta bundle when persist property in config is true.

The fix is to prevent the loading of delta bundle when persist is true and give a more clear error message.

Fixes open-policy-agent#5959

Signed-off-by: Yogesh Sinha <sinhayogi@gmail.com>
@anderseknert anderseknert force-pushed the remotes/origin/misleading_storage_not_found_error_fix branch from 006bc04 to 53feeff Compare June 13, 2023 12:55
@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 53feeff
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/6488672afe9ed60007f8a135
😎 Deploy Preview https://deploy-preview-6007--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@anderseknert
Copy link
Member

Hmm, the DCO check does not seem to be passing though. Not sure why, as the commit looks correct to me. @srenatus any idea?

@srenatus
Copy link
Contributor

image

☝️ It's at the bottom for the DCO check, see here

@anderseknert
Copy link
Member

Huh, why would it expect that signoff? It's a different author 😄

@srenatus
Copy link
Contributor

Yup no idea.

@srenatus
Copy link
Contributor

Also a different commit. So if push comes to shove, let's "Mark DCO as passed" using the UI.

@anderseknert
Copy link
Member

Done! Looks good to merge 👍

Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @yogisinha!

@ashutosh-narkar ashutosh-narkar merged commit 18f9ef2 into open-policy-agent:main Jun 13, 2023
27 of 38 checks passed
@yogisinha yogisinha deleted the remotes/origin/misleading_storage_not_found_error_fix branch June 14, 2023 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading storage_not_found_error when delta bundle uses persistence
4 participants