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

Remove UpsertPolicy/DeletePolicy from local.driver.altermodules #156

Closed
willbeason opened this issue Nov 15, 2021 · 2 comments
Closed

Remove UpsertPolicy/DeletePolicy from local.driver.altermodules #156

willbeason opened this issue Nov 15, 2021 · 2 comments
Assignees

Comments

@willbeason
Copy link
Member

File: constraint/pkg/client/drivers/local/local.go

We've determined these checks aren't necessary, so they just clutter up the code. Remove this behavior.

This also means we can remove .WithPathConflictsCheck(storage.NonEmpty(ctx, d.storage, txn)), and all calls which relate to the storage transaction in altermodules.

The tests that fail should be mocking Storage to fail on these calls - there isn't a way to execute the error paths naturally. If a non-storage-mocking test fails, then we might need to keep them for now. (Reach out to willbeason@ - this would be very surprising)

Also remove ast.CheckPathConflicts since there isn't any way this can fail (if you do manage to make it fail without mocking storage, add a test that showcases this behavior).

@davis-haba
Copy link
Contributor

I can take this on.

@willbeason
Copy link
Member Author

Done!

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

No branches or pull requests

2 participants