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
@patrick-east patrick-east added this to TODO (Things That Should Be Done) in Open Policy Agent via automation Apr 3, 2020
@patrick-east patrick-east moved this from TODO (Things That Should Be Done) to Planned (Things We Are Going To Do) in Open Policy Agent Apr 3, 2020
@tsandall tsandall moved this from Planned (Things We Are Going To Do) to TODO (Things That Should Be Done) in Open Policy Agent Apr 15, 2020
@tsandall tsandall moved this from TODO (Things That Should Be Done) to Planned (Things We Are Going To Do) in Open Policy Agent May 21, 2020
tsandall added a commit to tsandall/opa that referenced this issue Aug 7, 2020
Related: open-policy-agent#2265
Related: open-policy-agent#2266

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
tsandall added a commit that referenced this issue Aug 10, 2020
Related: #2265
Related: #2266

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
@tsandall
Copy link
Member

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

@tsandall tsandall moved this from Planned (Things We Are Going To Do) to TODO (Things That Should Be Done) in Open Policy Agent Sep 23, 2020
@tsandall tsandall removed this from TODO (Things That Should Be Done) in Open Policy Agent Nov 24, 2021
@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 ashutosh-narkar moved this from Pre 1.0 to In Progress in Open Policy Agent v1.0 Oct 10, 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 <anarkar4387@gmail.com>
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 <anarkar4387@gmail.com>
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 <anarkar4387@gmail.com>
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 <anarkar4387@gmail.com>
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 <anarkar4387@gmail.com>
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 <anarkar4387@gmail.com>
@ashutosh-narkar ashutosh-narkar moved this from In Progress to Done in Open Policy Agent v1.0 Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants