-
Notifications
You must be signed in to change notification settings - Fork 41
feat(policies): Policy groups #1351
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
Conversation
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
migmartri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jiparis. I still need to do a review, sorry for the delay.
But something that I have mixed feelings is the way we handle arguments (I explained my reasoning inline).
I'd love to know more about any evaluation you might have done on other approaches
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
I've removed the whole overriding logic. I think it makes sense to discuss it separately as part of how we handle policy arguments in general. |
migmartri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what I am doing but lgtm :)
This PR implements policy groups.
A policy group is a set of policies that can be applied to a contract as a whole. For instance, having this policy group:
It could be applied to a contract using the group reference, as it if was a "sub-contract":
The PR includes several refactors to extract common policy behavior and reuse code as much as possible.
Some features:
Demo (see how policies are applied):