Skip to content

runtime: Extract runtime info functions to public interface#8362

Merged
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:extract-runtime-info-pkg
Feb 24, 2026
Merged

runtime: Extract runtime info functions to public interface#8362
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:extract-runtime-info-pkg

Conversation

@charlieegan3
Copy link
Contributor

@charlieegan3 charlieegan3 commented Feb 23, 2026

This allows me to replicate the OPA test runner in the Regal LS more closely.

https://github.com/open-policy-agent/regal/pull/1888/changes#diff-6a862d98ef36b31df772aeddd4a535899610634ef1f56d36f8ce11a77cc0d729R33-R36 is where this is used in the related Regal PR.

Fixes #7427

This will allow Go SDK users to access this previously internal package.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 2218aa3
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/699c9107b1903e00087310fa
😎 Deploy Preview https://deploy-preview-8362--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@anderseknert
Copy link
Member

Possibly related, maybe solved, or could be with this? #7427

@charlieegan3
Copy link
Contributor Author

Thanks, I have marked as solving that one.

Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

The change looks good. I would have expected less opa-as-server compatibility, but if you feel like we should include those extra fields, it's fine.

obj.Insert(ast.InternedTerm("skip_known_schema_check"), ast.InternedTerm(params.SkipKnownSchemaCheck))
obj.Insert(ast.InternedTerm("authorization_enabled"), ast.InternedTerm(opts.IsAuthorizationEnabled))
obj.Insert(ast.InternedTerm("skip_known_schema_check"), ast.InternedTerm(opts.SkipKnownSchemaCheck))

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh I wasn't even aware of those. I always thought we "only" had config and env 😳

@anderseknert anderseknert merged commit 446f836 into open-policy-agent:main Feb 24, 2026
36 checks passed
@charlieegan3
Copy link
Contributor Author

Yeah tbh, I didn't consider the values in here much. I mostly was interested in making it just the same as cmd/test so we can best replicate in Regal (just in case someone is depending on ENV, or whatever)

@charlieegan3 charlieegan3 deleted the extract-runtime-info-pkg branch February 24, 2026 09:59
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.

Add helper to provide default values to rego.Runtime()

3 participants