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

Make library prefix constant #203

Merged
merged 3 commits into from
Mar 19, 2022

Conversation

willbeason
Copy link
Member

@willbeason willbeason commented Mar 17, 2022

Instead of using a variable template-specific location for libraries, use a fixed location so that users can refer to libraries by either their fully qualified name or their local name.

This behavior didn't have a complex enough test to trigger a bug found in Gatekeeper while merging the compiler sharding PR. This fixes the bug and adds a sufficiently-complex ConstraintTemplate which triggers the library import bug.

Will Beason added 2 commits March 17, 2022 14:11
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@willbeason
Copy link
Member Author

This bugfix also reduces compilation time by another 20%+ and reduced memory usage by 30%+

@willbeason willbeason changed the title Remove library prefix from Make library prefix constant Mar 17, 2022
@willbeason willbeason self-assigned this Mar 18, 2022
@willbeason willbeason added this to the Rego Environment Sharding milestone Mar 18, 2022
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@willbeason willbeason merged commit acd7764 into open-policy-agent:master Mar 19, 2022
@willbeason willbeason deleted the no-lib-prefix branch March 19, 2022 02:07
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.

None yet

3 participants