Skip to content

rego: expose QueryTracers, tracing.Options and Cancel from QueryContext #7767

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

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

srenatus
Copy link
Contributor

This contains three small changes to make previous hidden things available to rego plugins:

  1. QueryTracers is required for parameterized subtests to work

  2. tracing.Options are needed to have http.send and friends be wired up with OTel

  3. Cancellation is useful when the evaluation scenario is different from the usual, like in bulk requests

QueryTracers is required for parameterized subtests to work in a
different rego plugin.

tracing.Options are needed to have http.send and friends be wired up
with OTel when using a different rego plugin.

Cancellation is useful when the evaluation scenario is different from
the usual, like in bulk requests

Co-authored-by: Philip Conrad <[email protected]>
Signed-off-by: Stephan Renatus <[email protected]>
Copy link

netlify bot commented Jul 11, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit bf59814
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/68711002de11900008d2ebef
😎 Deploy Preview https://deploy-preview-7767--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.

@@ -126,6 +126,8 @@ type EvalContext struct {
strictBuiltinErrors bool
virtualCache topdown.VirtualCache
baseCache topdown.BaseCache
tracing tracing.Options
externalCancel topdown.Cancel // Note(philip): If non-nil, the cancellation is handled outside of this package.
Copy link
Member

Choose a reason for hiding this comment

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

Are you writing notes on behalf of Philip? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😄 Co-authored-by!

@srenatus srenatus merged commit e359478 into open-policy-agent:main Jul 11, 2025
31 checks passed
@srenatus srenatus deleted the sr/urkxyvvrzvkm branch July 11, 2025 13:53
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.

2 participants