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 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 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
Copy link
Contributor

@waynew waynew commented Mar 26, 2019

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

@twangboy
Copy link
Contributor

@twangboy twangboy commented Mar 26, 2019

@akmod Looks like you have some lint

@twangboy
Copy link
Contributor

@twangboy twangboy commented Mar 26, 2019

@Akm0d
Copy link
Contributor Author

@Akm0d 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
Contributor

@waynew 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 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 waynew left a comment

👍

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
Copy link
Contributor

@twangboy 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 Akm0d requested a review from twangboy Apr 22, 2019
@Akm0d Akm0d merged commit 3593c91 into saltstack:develop Apr 22, 2019
11 checks passed
@Akm0d Akm0d deleted the fix_pip branch Apr 22, 2019
gitebra pushed a commit to gitebra/salt that referenced this issue 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
Copy link
Contributor

@max-arnold max-arnold commented Nov 11, 2019

Can someone backport this to master branch?

@Akm0d
Copy link
Contributor Author

@Akm0d Akm0d commented Dec 2, 2019

@max-arnold Done 👍

@garethgreenaway garethgreenaway moved this from PR needs port to master to PR has port to master in PRs to port to master Mar 24, 2020
@garethgreenaway garethgreenaway added has master-port 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
Projects
PRs to port to master
  
PR has port to master
Development

Successfully merging this pull request may close these issues.

None yet

6 participants