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

Deprecate (and eventually remove) the ?partial option from the REST API #2266

Closed
patrick-east opened this issue Apr 3, 2020 · 2 comments · Fixed by #6300
Closed

Deprecate (and eventually remove) the ?partial option from the REST API #2266

patrick-east opened this issue Apr 3, 2020 · 2 comments · Fixed by #6300

Comments

@patrick-east
Copy link
Contributor

patrick-east commented Apr 3, 2020

NOTE: This does not deprecate partial evaluation itself, just a REST API query parameter that triggers it on certain calls. Partial evaluation is still supported.

The ?partial option on the REST API will do a partial evaluation of the query, cache that, and then return the result. Subsequent requests will use the cached partial result to evaluate the query.

The downside to this is that partial evaluation puts several slow things into the "hot" path for evaluations of OPA, and the cache is cleared any time data changes. This means that occasionally requests will have severely increased latency, which is not ideal.

What we should do is deprecate the ?partial flag, and move towards doing more automatic optimizations with partial evaluation in the background of the server (maybe when bundles are loaded), as well as pushing more for users that benefit from partial evaluations to consider doing it prior to loading policies into the OPA runtime.

First steps:

  • Log a depreciation warning whenever it is used
  • Remove it from the documentation, and suggest alternative approaches
  • Mark code in OPA source as deprecated
  • Put a notice in the changelog
tsandall added a commit to tsandall/opa that referenced this issue Aug 7, 2020
tsandall added a commit that referenced this issue Aug 10, 2020
@tsandall
Copy link
Member

The changes above are in. Let's schedule removal for v0.24.0 (the release after next).

@stale
Copy link

stale bot commented Apr 4, 2023

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

@stale stale bot added the inactive label Apr 4, 2023
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Oct 10, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: open-policy-agent#2266

Signed-off-by: Ashutosh Narkar <[email protected]>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Oct 11, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: open-policy-agent#2266

Signed-off-by: Ashutosh Narkar <[email protected]>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Oct 11, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: open-policy-agent#2266

Signed-off-by: Ashutosh Narkar <[email protected]>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Oct 11, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: open-policy-agent#2266

Signed-off-by: Ashutosh Narkar <[email protected]>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Oct 11, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: open-policy-agent#2266

Signed-off-by: Ashutosh Narkar <[email protected]>
srenatus pushed a commit that referenced this issue Oct 11, 2023
The partial query parameter has been marked as deprecated since
v0.23.0. It's also removed from the docs since that time.

Fixes: #2266

Signed-off-by: Ashutosh Narkar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants