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

Feature Request: Quiet mode for output #180

Closed
cmbrad opened this issue Nov 12, 2019 · 3 comments
Closed

Feature Request: Quiet mode for output #180

cmbrad opened this issue Nov 12, 2019 · 3 comments
Assignees
Labels
enhancement waiting for confirmation Workaround/Fix applied, waiting for confirmation
Milestone

Comments

@cmbrad
Copy link

cmbrad commented Nov 12, 2019

Feature Request

Feature description :

We're trying to run terraform-compliance with Atlantis (https://github.com/runatlantis/atlantis). Atlantis comments on Pull Requests and with the current output it produces a lot of noise which makes it difficult to find actionable messages in the comments, especially as the comments are split by length into multiple comments. It would be nice to have a quiet mode which reduces the amount of output to only include failures / a summary of skipping/passing.

I can almost achieve what I want by using these settings (it appears terraform-compliance passes "--no-ansi --formatter dots" on to radish) but the output still includes a lot of "SKIPPING" log lines from terraform-compliance.

terraform-compliance --no-ansi --formatter dots -p plan.out -f rules

Suggested Solution description ( if you have any ) :

  1. Add a quiet mode to turn off extra log messages such as SKIPPING in extensions/ext_radish_bdd.py
  2. Provide a 'native' way to set radish options such as formatter and no-ansi if the fact that it's working now is unintentional

Describe alternatives you've considered :

  1. Write a parser to post-process terraform-compliance output. Prefer not to do this to avoid maintaining extra code

Additional context :

@eerkunt eerkunt self-assigned this Nov 12, 2019
@eerkunt
Copy link
Member

eerkunt commented Nov 12, 2019

Hey @cmbrad, thanks for the feature request 🎉

I agree, we need to remove SKIPPING messages if --formatter is used. 👍 I also had this problem in some of the CodeBuild pipelines with lots of log output.

For ;

Provide a 'native' way to set radish options such as formatter and no-ansi if the fact that it's working now is unintentional

Currently all radish options are available to be used with terraform-compliance. So this is natively supported. We didn't want to create new parameters for referencing radish parameters. Instead we pass all additional parameters that doesn't exist in terraform-compliance to radish

ℹ️ Just a tip, if you have lots of terraform-compliance scenarios, you can also use --early-exit for exiting immediately on a failure instead of running ALL tests.

@eerkunt eerkunt added this to the 1.0.56 milestone Nov 12, 2019
@eerkunt
Copy link
Member

eerkunt commented Nov 12, 2019

Can you please have a try with 1.0.56 version ?

Thanks!

@eerkunt eerkunt added the waiting for confirmation Workaround/Fix applied, waiting for confirmation label Nov 12, 2019
@cmbrad
Copy link
Author

cmbrad commented Nov 13, 2019

Wow that was fast. Just tested and it's working as I wanted, thanks :) And thanks for the tip, might add that in as we write some more rules.

Cheers,
Chris

@cmbrad cmbrad closed this as completed Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement waiting for confirmation Workaround/Fix applied, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants