forked from open-policy-agent/opa
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
planner: adjust check introduced in open-policy-agent#5839
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>
- Loading branch information
Showing
2 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
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
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