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

fix command line options #49622

Merged
merged 12 commits into from Dec 17, 2018

Conversation

Projects
None yet
6 participants
@angeloudy
Copy link
Contributor

commented Sep 12, 2018

What does this PR do?

python subprocess.run only accepts arguments as a list.
eg.

extract_something:
  archive.extracted:
    - name: /tmp/myfile.zip
    - options: -x myfile/test
    - archive_format: zip

In the state above, options wouldn't work because salt will only subprocess.run(['unzip', '-x myfile/test', '/tmp/myfile.zip']) instead of subprocess.run(['unzip', '-x', 'myfile/test', '/tmp/myfile.zip'])

angeloudy

@rallytime rallytime requested a review from terminalmage Sep 12, 2018

angeloudy added some commits Sep 14, 2018

Show resolved Hide resolved salt/modules/archive.py Outdated
Show resolved Hide resolved salt/modules/archive.py Outdated
@terminalmage

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2018

@rallytime This should be backported as far back as you feel comfortable.

angeloudy added some commits Sep 24, 2018

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2018

@angeloudy Can you make the requested changes listed above? Then we can move this forward.

@cachedout

This comment has been minimized.

Copy link
Collaborator

commented Oct 16, 2018

@angeloudy We would really like to get this in but we need a response from you. Will you have any free time to look at this?

angeloudy added some commits Oct 19, 2018

@angeloudy

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2018

@cachedout I have made the suggested changes.

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

Hi @angeloudy - There is a test failing due to the changes here. Can you take a look?

https://jenkinsci.saltstack.com/job/pr-kitchen-ubuntu1604-py2/job/PR-49622/16/

@angeloudy

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2018

@rallytime I made the suggested changes cmd.extend() which break it because it seems cmd is not always initialized. Shall I change it back to cmd +

angeloudy added some commits Nov 16, 2018

@cachedout

This comment has been minimized.

Copy link
Collaborator

commented Dec 10, 2018

@rallytime I made the suggested changes cmd.extend() which break it because it seems cmd is not always initialized. Shall I change it back to cmd +

I think we should just initialize cmd.

@thatch45
Copy link
Member

left a comment

Just the change I posted

Show resolved Hide resolved salt/modules/archive.py Outdated

angeloudy added some commits Dec 17, 2018

@terminalmage terminalmage merged commit e04d0e3 into saltstack:develop Dec 17, 2018

11 checks passed

WIP Ready for review
Details
codeclimate All good!
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
@terminalmage

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2018

Backported in #50883

dwoz added a commit that referenced this pull request Dec 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.