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

Allow arbitrary arguments to be passed to pip through pip.installed #52327

Merged
merged 15 commits into from Apr 22, 2019

Conversation

@Akm0d
Copy link
Contributor

Akm0d commented Mar 26, 2019

What does this PR do?

Makes it possible to pass arbitrary arguments to pip from pip.installed

What issues does this PR fix or reference?

#24751

Previous Behavior

N/A

New Behavior

pip keyword and positional arguments not yet implemented in salt can be passed to pip through pip.installed

.. code-block:: yaml

    pandas:
      pip.installed:
        - name: pandas
        - pip_future:
          - --latest-pip-kwarg:
            - param1
            - param2
          - --latest-pip-arg

Will be translated into the following pip command:

.. code-block:: bash

    pip install pandas --latest-pip-kwarg param1 --latest-pip-kwarg parm2 --latest-pip-arg

Tests written?

Yes

Commits signed with GPG?

Yes

@Akm0d Akm0d requested a review from saltstack/team-core as a code owner Mar 26, 2019
@Akm0d Akm0d changed the title Fix pip Allow arbitrary arguments to be passed to pip through pip.installed Mar 26, 2019
@waynew

This comment has been minimized.

Copy link
Contributor

waynew commented Mar 26, 2019

Uh... I think you might want to rebase your fixes :trollface: (or retarget your PR)

@Akm0d Akm0d force-pushed the Akm0d:fix_pip branch from 582d306 to 13cf46f Mar 26, 2019
@twangboy

This comment has been minimized.

Copy link
Contributor

twangboy commented Mar 26, 2019

@akmod Looks like you have some lint

@twangboy

This comment has been minimized.

Akm0d added 2 commits Mar 26, 2019
@Akm0d

This comment has been minimized.

Copy link
Contributor Author

Akm0d commented Mar 27, 2019

Failing on Centos7 with python3 and windows, but not because of the commit. Centos7 and Windows are having issues in Jenkins

@waynew

This comment has been minimized.

Copy link
Contributor

waynew commented Mar 28, 2019

I'm not sure if the remaining problem is legit something with these tests - it is a problem in the pip state tests, so probably worth looking into 👍

Akm0d added 2 commits Mar 28, 2019
@Akm0d Akm0d requested a review from waynew Apr 3, 2019
@dwoz dwoz requested a review from thatch45 Apr 3, 2019
@waynew
waynew approved these changes Apr 3, 2019
Copy link
Contributor

waynew left a comment

👍

garethgreenaway and others added 2 commits Apr 3, 2019
Akm0d added 4 commits Apr 10, 2019
- Changed `pip_future` to `extra_args`
- Changed the execution module code block to a cli example
- Moved the state.sls example to pip_state.py
- solves #24751
Copy link
Contributor

twangboy left a comment

A few minor things. Looks great.

salt/modules/pip.py Show resolved Hide resolved
salt/modules/pip.py Show resolved Hide resolved
salt/states/pip_state.py Show resolved Hide resolved
Akm0d added 3 commits Apr 19, 2019
@Akm0d Akm0d requested a review from twangboy Apr 22, 2019
@Akm0d Akm0d merged commit 3593c91 into saltstack:develop Apr 22, 2019
11 checks passed
11 checks passed
WIP Ready for review
Details
codeclimate 2 fixed issues
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test 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
@Akm0d Akm0d deleted the Akm0d:fix_pip branch Apr 22, 2019
gitebra pushed a commit to gitebra/salt that referenced this pull request Apr 23, 2019
* upstream/develop: (32 commits)
  Allow arbitrary arguments to be passed to pip through pip.installed (saltstack#52327)
  Update integration.modules.test_network.NetworkTest.test_network_ping test address
  Add missing `return`
  Adding gems needed to run kitchen-salt on OS X.  Disabling a unit test that does not currently run successfully on OS X.
  Rewrite module.run docs
  typo in hold -> unhold copy
  initial docs for ssh wrapper modules
  Update index.rst
  correct bad indentation in docs
  Update VMWare driver to allow joining domain and setting timezone during customziation.
  Pass eauth arguments to the batch job
  Fixed lint
  Fixed Code Climate
  Fixed Code Climate
  Update CodeClimate settings
  Execute prior publishing preparation steps
  Lint cleanup
  Add validate command to tls module
  Fix digest and type bugs
  Remove misleading comment.
  ...
@waynew waynew added this to PR needs port to master in PRs to port to master Oct 24, 2019
@max-arnold

This comment has been minimized.

Copy link
Contributor

max-arnold commented Nov 11, 2019

Can someone backport this to master branch?

@Akm0d

This comment has been minimized.

Copy link
Contributor Author

Akm0d commented Dec 2, 2019

@max-arnold Done 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PRs to port to master
  
PR needs port to master
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.