Skip to content

feat: support print statement in gator (#2949) #3872

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Serializator
Copy link

What this PR does / why we need it:
This PR adds support for the print statement in Gator for easier debugging. The workaround suggested in #2949 was to use the trace statement with -t but due to the excess amount of logs the debug statements are lost.

This PR re-uses the existing --verbose / -v flag so not to add yet another command-line flag. If a separate command-line flag is preferred, this can easily be added.

Which issue(s) this PR fixes:
Fixes #2949

@Serializator Serializator requested a review from a team as a code owner March 26, 2025 20:24
@Serializator Serializator force-pushed the gator-support-print-statement branch 2 times, most recently from 3508492 to f8fc481 Compare March 26, 2025 20:28
Signed-off-by: Julian van den Berkmortel <7153670+Serializator@users.noreply.github.com>
@Serializator Serializator force-pushed the gator-support-print-statement branch from f8fc481 to 9e41d23 Compare March 26, 2025 20:29
Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

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

@Serializator Thanks for the PR. For completeness this should be added to gator test as well. Since verbose flag does not exists in gator test I recommend adding verbose flag there or enable print with trace in both since trace flag exists for verify and test or introduce a new flag for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gator CLI to render print statements output from rego code to stdout
2 participants