build(deps): bump github.com/open-policy-agent/opa from 0.60.0 to 0.61.0
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.60.0 to 0.61.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v0.60.0...v0.61.0) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
7980be48a1
commit
690d44cfb0
+6
-1
@@ -89,6 +89,10 @@ func LoadWasmResolversFromStore(ctx context.Context, store storage.Store, txn st
|
||||
|
||||
// LoadBundleFromDisk loads a previously persisted activated bundle from disk
|
||||
func LoadBundleFromDisk(path, name string, bvc *bundle.VerificationConfig) (*bundle.Bundle, error) {
|
||||
return LoadBundleFromDiskForRegoVersion(ast.RegoV0, path, name, bvc)
|
||||
}
|
||||
|
||||
func LoadBundleFromDiskForRegoVersion(regoVersion ast.RegoVersion, path, name string, bvc *bundle.VerificationConfig) (*bundle.Bundle, error) {
|
||||
bundlePath := filepath.Join(path, name, "bundle.tar.gz")
|
||||
|
||||
if _, err := os.Stat(bundlePath); err == nil {
|
||||
@@ -98,7 +102,8 @@ func LoadBundleFromDisk(path, name string, bvc *bundle.VerificationConfig) (*bun
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
r := bundle.NewCustomReader(bundle.NewTarballLoaderWithBaseURL(f, ""))
|
||||
r := bundle.NewCustomReader(bundle.NewTarballLoaderWithBaseURL(f, "")).
|
||||
WithRegoVersion(regoVersion)
|
||||
|
||||
if bvc != nil {
|
||||
r = r.WithBundleVerificationConfig(bvc)
|
||||
|
||||
+9
-7
@@ -28,6 +28,7 @@ type InsertAndCompileOptions struct {
|
||||
Bundles map[string]*bundle.Bundle
|
||||
MaxErrors int
|
||||
EnablePrintStatements bool
|
||||
ParserOptions ast.ParserOptions
|
||||
}
|
||||
|
||||
// InsertAndCompileResult contains the output of the operation.
|
||||
@@ -58,13 +59,14 @@ func InsertAndCompile(ctx context.Context, opts InsertAndCompileOptions) (*Inser
|
||||
m := metrics.New()
|
||||
|
||||
activation := &bundle.ActivateOpts{
|
||||
Ctx: ctx,
|
||||
Store: opts.Store,
|
||||
Txn: opts.Txn,
|
||||
Compiler: compiler,
|
||||
Metrics: m,
|
||||
Bundles: opts.Bundles,
|
||||
ExtraModules: policies,
|
||||
Ctx: ctx,
|
||||
Store: opts.Store,
|
||||
Txn: opts.Txn,
|
||||
Compiler: compiler,
|
||||
Metrics: m,
|
||||
Bundles: opts.Bundles,
|
||||
ExtraModules: policies,
|
||||
ParserOptions: opts.ParserOptions,
|
||||
}
|
||||
|
||||
err := bundle.Activate(activation)
|
||||
|
||||
Reference in New Issue
Block a user