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

Ignore Dry-Runs (--check) #148

Open
rntbrgtt opened this issue Jul 7, 2020 · 4 comments
Open

Ignore Dry-Runs (--check) #148

rntbrgtt opened this issue Jul 7, 2020 · 4 comments

Comments

@rntbrgtt
Copy link

rntbrgtt commented Jul 7, 2020

What component is this about ?

I would like to be able to ignore all Dry-Runs (--check) and not save those executions on ARA database.

What is your ARA installation like ?

ARA 1.4.2
Installed from pip
Virtual Env
Debian GNU/Linux 10 (buster)
Mysql Database

What is the idea ?

The idea is to just have the important playbook executions on ARA database.

@dmsimard
Copy link
Contributor

dmsimard commented Jul 7, 2020

Hey @rntbrgtt and thanks for the issue !

I think we can do that. It would be a setting for the callback and if it determines that --check is enabled, it wouldn't do anything.

I actually have a similar need that I planned on working on soon and while it isn't exactly what you've asked for, how would you feel if dry-run playbooks could be easily identified or filtered ?

I don't know exactly what shape or form this would take yet. We currently know if a playbook ran in "--check" through the CLI arguments:
Screenshot from 2020-07-07 09-55-29

We could use the value of <playbook>["arguments"]["check"] and then do something with that, whether it's to highlight in a different color, filtering in (or out), etc.

@rntbrgtt
Copy link
Author

rntbrgtt commented Jul 7, 2020

Hi dmsimard ,

Thanks for your help and time working on this.

We always run dry runs with --check or -C so if you use that to identify it will work for us.

Regards,

@dmsimard
Copy link
Contributor

Hey @rntbrgtt, I haven't had time for this yet but I'd like to include something for this in v1.5.

@dmsimard dmsimard added this to the 1.5 milestone Aug 13, 2020
@dmsimard
Copy link
Contributor

I'm going to test an approach to use labels to highlight check mode, it's WIP here: https://review.opendev.org/#/c/752259/

arecordsansible pushed a commit that referenced this issue Sep 19, 2020
This new configuration option will label playbooks automatically
based on CLI arguments picked up by the callback.

For example, when "--check" is used, it would label the playbook with
the label "check:True" or "check:True" when it isn't used.

Related: #148
Related: #119
Change-Id: Ifd475875bf83a21ab35c9cf0ac0410520b98d804
@dmsimard dmsimard removed this from the 1.5 milestone Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants