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

engine+reporter: enable print() output #629

Merged

Conversation

srenatus
Copy link
Contributor

@srenatus srenatus commented Oct 29, 2021

This depends on OPA 0.34.0: #627

  • conftest verify
  • conftest test

@srenatus srenatus marked this pull request as draft October 29, 2021 09:12
acceptance.bats Outdated
[[ "${lines[0]}" =~ "data.main.test_no_missing_label: PASS" ]]
[[ "${lines[2]}" == "--------------------------------------------------------------------------------" ]]
[[ "${lines[3]}" == "PASS: 1/1" ]]
[[ "${lines[1]}" == ' {"app.kubernetes.io/instance", "app.kubernetes.io/name"}' ]]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something funky going on here: if I change this line to something completely different, the test will fail.

If I change the line to something completely different and move it to line 102, tests will not fail.

@srenatus srenatus force-pushed the add-print-stmt-output-to-report branch 2 times, most recently from 74ae632 to 157a32c Compare October 30, 2021 17:42
@srenatus srenatus marked this pull request as ready for review October 30, 2021 17:47
Copy link
Member

@jalseth jalseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks so much for adding this and cleaning up some of the other code. Just one tiny nitpick that I'd appreciate if you can address before I merge.

policy/engine.go Outdated Show resolved Hide resolved
Any `print()` calls that happened while a query was evaluated should now
be printed to stdout, with a "PRNT" label.

This depends on OPA 0.34.0.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
@srenatus srenatus force-pushed the add-print-stmt-output-to-report branch from 157a32c to a72d269 Compare November 1, 2021 08:26
@srenatus srenatus changed the title report: enable print() output engine+reporter: enable print() output Nov 1, 2021
@jalseth jalseth merged commit b690395 into open-policy-agent:master Nov 4, 2021
@srenatus srenatus deleted the add-print-stmt-output-to-report branch November 4, 2021 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants