Skip to content

plugins/logs: Add experimental intermediate results field.#7796

Merged
srenatus merged 1 commit intoopen-policy-agent:mainfrom
philipaconrad:philip/intermediate-results
Jul 24, 2025
Merged

plugins/logs: Add experimental intermediate results field.#7796
srenatus merged 1 commit intoopen-policy-agent:mainfrom
philipaconrad:philip/intermediate-results

Conversation

@philipaconrad
Copy link
Copy Markdown
Member

@philipaconrad philipaconrad commented Jul 23, 2025

What changed?

This PR adds an experimental "intermediate results" field to decision logs, and provides some basic plumbing in the server package for eventually attaching the intermediate results of an eval to the request context.

The feature can be enabled with the environment variable OPA_DECISIONS_INTERMEDIATE_RESULTS, like so:

export OPA_DECISIONS_INTERMEDIATE_RESULTS=1 ./opa run -s mypolicy.rego --set

The intermediate results are not populated with anything exciting yet, so it should have no effect on decision logs.

@philipaconrad philipaconrad requested a review from srenatus July 23, 2025 22:54
@philipaconrad philipaconrad self-assigned this Jul 23, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 23, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit b8c52d8
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/68816da739e1cf00089163ee
😎 Deploy Preview https://deploy-preview-7796--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.

@philipaconrad philipaconrad force-pushed the philip/intermediate-results branch from b99215f to e7a81a5 Compare July 23, 2025 23:13
@philipaconrad philipaconrad marked this pull request as ready for review July 23, 2025 23:14
This commit adds an experimental "intermediate results" field to
decision logs, and provides some basic plumbing in the server package
for attaching the intermediate results of an eval to the request
context.

Co-authored-by: Teemu Koponen <koponen@styra.com>
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
@philipaconrad philipaconrad force-pushed the philip/intermediate-results branch from e7a81a5 to b8c52d8 Compare July 23, 2025 23:17
@srenatus srenatus merged commit 8190f99 into open-policy-agent:main Jul 24, 2025
31 checks passed
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