Skip to content

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

Merged
Akm0d merged 15 commits into
saltstack:developfrom
Akm0d:fix_pip
Apr 22, 2019
Merged

Allow arbitrary arguments to be passed to pip through pip.installed#52327
Akm0d merged 15 commits into
saltstack:developfrom
Akm0d:fix_pip

Conversation

@Akm0d
Copy link
Copy Markdown
Contributor

@Akm0d 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 a team as a code owner March 26, 2019 17:38
@Akm0d Akm0d changed the title Fix pip Allow arbitrary arguments to be passed to pip through pip.installed Mar 26, 2019
@waynew
Copy link
Copy Markdown
Contributor

waynew commented Mar 26, 2019

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

@twangboy
Copy link
Copy Markdown
Contributor

@akmod Looks like you have some lint

@twangboy
Copy link
Copy Markdown
Contributor

@Akm0d
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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 Akm0d requested a review from waynew April 3, 2019 00:07
@dwoz dwoz requested a review from thatch45 April 3, 2019 16:33
Copy link
Copy Markdown
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Akm0d added 4 commits April 10, 2019 10:12
- 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
Copy link
Copy Markdown
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor things. Looks great.

Comment thread salt/modules/pip.py
Comment thread salt/modules/pip.py
Comment thread salt/states/pip_state.py
@Akm0d Akm0d requested a review from twangboy April 22, 2019 20:23
@Akm0d Akm0d merged commit 3593c91 into saltstack:develop Apr 22, 2019
@Akm0d Akm0d deleted the fix_pip branch April 22, 2019 21:02
@max-arnold
Copy link
Copy Markdown
Contributor

Can someone backport this to master branch?

@Akm0d
Copy link
Copy Markdown
Contributor Author

Akm0d commented Dec 2, 2019

@max-arnold Done 👍

@garethgreenaway garethgreenaway added has master-port port to master has been created and removed master-port labels Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has master-port port to master has been created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants