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

rego: Parse store modules iff modules set on the Rego object #6081

Merged

Commits on Jul 7, 2023

  1. rego: Parse store modules iff modules set on the Rego object

    Currently we parse store modules irrespective of whether
    there are modules on the Rego object. This will result in
    the compilation of those modules which triggers the bundle
    activation flow. Now as part of the module compilation
    we interact with the compiler's modules and run compilation
    on the input modules. If let's say there are concurrent health
    check requests (ie. /v1/health), this could result in a race
    during the compilation process while working with the compiler's
    modules.
    
    This change avoids this situation by skipping parsing of the store
    modules when none are set on the Rego object. The assumption this
    change makes is that while using the rego package the compiler and
    store are kept in-sync.
    
    Fixes: open-policy-agent#5868
    
    Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
    ashutosh-narkar committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    a1f687b View commit details
    Browse the repository at this point in the history