You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have observed a deviation in the OPA CLI command: inspect, after we upgraded from OPA CLI version: 0.56.0 to version: 0.65.0.
The inspect command is passing in OPA CLI version 0.56.0 while failing for the version 0.65.0, when we have a remote rego function dependency, and it is mocked in the test files.
Steps To Reproduce
Rego files directory structure:
Attached the required files to the issue for reference
package some_remote_package.policy
# This function takes in number and returns true if it is even else false
is_even(num) {
print("Checking if number: ", num, " is even or not")
num % 2 == 0
print(num, " is even")
true
} else {
print(num, "is not even")
false
}
remote-function-error/local-policy/policy.rego
package remote.function.error.policy
import data.some_remote_package.policy.is_even as is_even
# Calls the remote `is_even()` function in a way it will return true. So the output would be true
pdp = output {
print("At PDP")
is_even(0) == true
print("is_even() returned true")
output = true
} else = output {
print("is_even() returned false")
output = false
}
Short description
We have observed a deviation in the OPA CLI command: inspect, after we upgraded from OPA CLI version: 0.56.0 to version: 0.65.0.
The inspect command is passing in OPA CLI version 0.56.0 while failing for the version 0.65.0, when we have a remote rego function dependency, and it is mocked in the test files.
Steps To Reproduce
Rego files directory structure:
Attached the required files to the issue for reference
Below are the file contents:
OPA CLI INSPECT command outputs
CLI Command: .\opa-0.56.exe inspect .\remote-function-error\local-policy
Output:
CLI Command: .\opa-0.65.exe inspect .\remote-function-error\local-policy
Output:
The text was updated successfully, but these errors were encountered: