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

Added a support for a global proxy to pip module #55596

Merged
merged 1 commit into from
Dec 14, 2019

Conversation

Oloremo
Copy link
Contributor

@Oloremo Oloremo commented Dec 10, 2019

What does this PR do?

Added support for a global Salt proxy to pip module

What issues does this PR fix or reference?

#55593

Previous Behavior

pip module and state doesn't support salt global proxy

New Behavior

pip module and state does support salt global proxy

Tests written?

Yes

Commits signed with GPG?

Yes

@Oloremo Oloremo requested a review from a team as a code owner December 10, 2019 21:21
@ghost ghost requested a review from dwoz December 10, 2019 21:21
@Oloremo Oloremo force-pushed the 55593-pip-global-proxy branch 2 times, most recently from 80d07b4 to a17b393 Compare December 11, 2019 13:28
.. note::
If the the Minion has a globaly configured proxy - it will be used
even if no proxy was set here. To explicitly disable proxy for pip
you should pass the ``False`` as a value.
Copy link
Collaborator

Choose a reason for hiding this comment

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

'you should pass False as'...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tx. done

Copy link
Collaborator

@s0undt3ch s0undt3ch left a comment

Choose a reason for hiding this comment

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

I would also do something like:

    elif proxy is not False and config.get('proxy_host') and config.get('proxy_port'):
        if config.get('proxy_username') and config.get('proxy_password'):
            http_proxy_url = 'http://{proxy_username}:{proxy_password}@{proxy_host}:{proxy_port}'.format(**config)
        else:
            http_proxy_url = 'http://{proxy_host}:{proxy_port}'.format(**config)

@Oloremo
Copy link
Contributor Author

Oloremo commented Dec 12, 2019

@s0undt3ch Very cool, added!

@Oloremo
Copy link
Contributor Author

Oloremo commented Dec 12, 2019

re-run full opensuse15-py2

@Oloremo
Copy link
Contributor Author

Oloremo commented Dec 12, 2019

re-run full ubuntu1604-py2

@Oloremo
Copy link
Contributor Author

Oloremo commented Dec 13, 2019

re-run full macosxmojave-py2

@Oloremo
Copy link
Contributor Author

Oloremo commented Dec 13, 2019

re-run full windows2019-py3

@dwoz dwoz merged commit 18acbd5 into saltstack:master Dec 14, 2019
@max-arnold
Copy link
Contributor

Nitpick: it is worth documenting that the no_proxy global setting has no effect on pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants