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

Add option for specifying decision ID to SDK #6101

Conversation

brianchhun-chime
Copy link
Contributor

Why the changes in this PR are needed?

This allows clients to specify the decision ID for the decisions returned by the Decision and Partial functions provided by the SDK package. If not provided, a uniquely generated identifier will be generated for the decision, just as before.

What are the changes in this PR?

This option can be useful for clients that have already generated a decision ID prior to calling OPA. It would then be convenient to pass that decision ID through to OPA so decision logs use that same ID.

Notes to assist PR review:

This fixes #6100

This allows clients to specify the decision ID for the decisions
returned by the `Decision` and `Partial` functions provided by the SDK
package. If not provided, a uniquely generated identifier will be
generated for the decision, just as before.

This option can be useful for clients that have already generated a
decision ID prior to calling OPA. It would then be convenient to pass
that decision ID through to OPA so decision logs use that same ID.

Signed-off-by: Brian Chhun <brian.chhun@chime.com>
@brianchhun-chime brianchhun-chime marked this pull request as ready for review July 17, 2023 20:09
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution @brianchhun-chime!

@ashutosh-narkar ashutosh-narkar merged commit 5cd774e into open-policy-agent:main Jul 17, 2023
25 checks passed
@brianchhun-chime brianchhun-chime deleted the sdk-decision-option-decision-id branch July 18, 2023 14:37
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 option for specifying decision ID to SDK
2 participants