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

Have an alias to use dryrun=True instead of test=True #45376

Open
arthurzenika opened this issue Jan 10, 2018 · 10 comments
Open

Have an alias to use dryrun=True instead of test=True #45376

arthurzenika opened this issue Jan 10, 2018 · 10 comments
Labels
Feature new functionality including changes to functionality and code refactors, etc.
Milestone

Comments

@arthurzenika
Copy link
Contributor

Description of Issue/Question

Some new salt users I came across told me that the test=True could be confusing and would prefer to have a more standard dryrun terminology for what test=True does in salt. I thought I'd start the discussion here about having an alias that does this.

Is it technically difficult to have an alias for dryrun=test which adds test=True early enough to provide such a functionality ?

Doing a grep for dryrun in the code I find that some states already use this argument so if we go down that road we need to make sure they don't break (pkgng, rsync, dockermod)

@garethgreenaway garethgreenaway added this to the Blocked milestone Jan 10, 2018
@garethgreenaway garethgreenaway added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jan 10, 2018
@garethgreenaway
Copy link
Contributor

garethgreenaway commented Jan 10, 2018

@thatch45 Would you weighing in on this one?

@thatch45
Copy link
Contributor

thatch45 commented Jan 10, 2018

dryrun or dry_run or no-op etc would all be good options here. All we would need to do to add an alias is just take the argument to state.apply/highstate/sls/high/low/pkg/top/sls_id functions, would be to add this:

def apply(mods=None, **kwargs):
    if 'dryrun' in kwargs:
        kwargs['test'] = kwargs.pop('dryrun')

then it would be 100% safe, the trick would be to pop the key from the kwargs

@garethgreenaway garethgreenaway added the Feature new functionality including changes to functionality and code refactors, etc. label Jan 10, 2018
@garethgreenaway garethgreenaway modified the milestones: Blocked, Approved Jan 10, 2018
@garethgreenaway garethgreenaway removed the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jan 10, 2018
@garethgreenaway
Copy link
Contributor

@thatch45 Thanks! Adding the Feature label.

@thatch45
Copy link
Contributor

Yes, this is something that would take all of 15 minutes to add and we should have added it long ago

@stale
Copy link

stale bot commented May 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label May 5, 2019
@arthurzenika
Copy link
Contributor Author

up

@stale
Copy link

stale bot commented May 7, 2019

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label May 7, 2019
@stale
Copy link

stale bot commented Jan 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 8, 2020
@arthurzenika
Copy link
Contributor Author

up

@stale
Copy link

stale bot commented Jan 9, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc.
3 participants