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
planner: adjust check introduced in #5839 #5965
Merged
srenatus
merged 1 commit into
open-policy-agent:main
from
srenatus:sr/planner-bug-ref-heads
Jun 3, 2023
Merged
planner: adjust check introduced in #5839 #5965
srenatus
merged 1 commit into
open-policy-agent:main
from
srenatus:sr/planner-bug-ref-heads
Jun 3, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
srenatus
force-pushed
the
sr/planner-bug-ref-heads
branch
from
June 2, 2023 11:50
4c2e00c
to
24bb477
Compare
srenatus
commented
Jun 2, 2023
// a.d := "y" | ||
// since the length doesn't add up. Even if input.x was "d", the second | ||
// rule (a.d) wouldn't contribute anything to the result, since we cannot | ||
// "dot it". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're leaning a bit onto the compiler's restrictions wrt overlapping rules here... it's also a bit of a mess 😬
ashutosh-narkar
approved these changes
Jun 2, 2023
So the check introduced before was too broad: it aborted optimizations at the wrong spot -- the resulting plan didn't add up: path lengths used in CallDynamicStmt didn't match path lengths that the planned funcs had. So, while this change looks like over-fitting (also to me), we're really trying to make test previous fix more specific. Generally looking at that section of the planner, it feels like the intro of general refs would be a good moment to nuke and start over: the way that refs-with-vars are put into the ruletrie seems like the root cause of our trouble here. Fixes open-policy-agent#5964. Signed-off-by: Stephan Renatus <stephan@styra.com>
srenatus
force-pushed
the
sr/planner-bug-ref-heads
branch
from
June 3, 2023 08:13
24bb477
to
986b229
Compare
ashutosh-narkar
pushed a commit
to ashutosh-narkar/opa
that referenced
this pull request
Jun 5, 2023
…cy-agent#5965) So the check introduced before was too broad: it aborted optimizations at the wrong spot -- the resulting plan didn't add up: path lengths used in CallDynamicStmt didn't match path lengths that the planned funcs had. So, while this change looks like over-fitting (also to me), we're really trying to make test previous fix more specific. Generally looking at that section of the planner, it feels like the intro of general refs would be a good moment to nuke and start over: the way that refs-with-vars are put into the ruletrie seems like the root cause of our trouble here. Fixes open-policy-agent#5964. Signed-off-by: Stephan Renatus <stephan@styra.com> (cherry picked from commit a808056)
ashutosh-narkar
pushed a commit
that referenced
this pull request
Jun 6, 2023
So the check introduced before was too broad: it aborted optimizations at the wrong spot -- the resulting plan didn't add up: path lengths used in CallDynamicStmt didn't match path lengths that the planned funcs had. So, while this change looks like over-fitting (also to me), we're really trying to make test previous fix more specific. Generally looking at that section of the planner, it feels like the intro of general refs would be a good moment to nuke and start over: the way that refs-with-vars are put into the ruletrie seems like the root cause of our trouble here. Fixes #5964. Signed-off-by: Stephan Renatus <stephan@styra.com> (cherry picked from commit a808056)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So the check introduced before was too broad: it aborted optimizations at the wrong spot -- the resulting plan didn't add up: path lengths used in CallDynamicStmt didn't match path lengths that the planned funcs had.
So, while this change looks like over-fitting (also to me), we're really trying to make test previous fix more specific.
Generally looking at that section of the planner, it feels like the intro of general refs would be a good moment to nuke and start over: the way that refs-with-vars are put into the ruletrie seems like the root cause of our trouble here.
Fixes #5964.