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 as a code owner Dec 10, 2019
@ghost ghost requested a review from dwoz Dec 10, 2019
@Oloremo Oloremo force-pushed the 55593-pip-global-proxy branch 2 times, most recently from 80d07b4 to a17b393 Compare Dec 11, 2019
.. 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
Member

@s0undt3ch s0undt3ch Dec 12, 2019

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

@Oloremo Oloremo Dec 12, 2019

Choose a reason for hiding this comment

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

tx. done

@Oloremo Oloremo force-pushed the 55593-pip-global-proxy branch from 27e471d to 8f7ef15 Compare Dec 12, 2019
Copy link
Member

@s0undt3ch s0undt3ch left a comment

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 Oloremo force-pushed the 55593-pip-global-proxy branch from 8f7ef15 to 2619434 Compare Dec 12, 2019
@Oloremo
Copy link
Contributor Author

@Oloremo Oloremo commented Dec 12, 2019

@s0undt3ch Very cool, added!

@Oloremo
Copy link
Contributor Author

@Oloremo Oloremo commented Dec 12, 2019

re-run full opensuse15-py2

@Oloremo
Copy link
Contributor Author

@Oloremo Oloremo commented Dec 12, 2019

re-run full ubuntu1604-py2

@Oloremo
Copy link
Contributor Author

@Oloremo Oloremo commented Dec 13, 2019

re-run full macosxmojave-py2

@Oloremo
Copy link
Contributor Author

@Oloremo Oloremo commented Dec 13, 2019

re-run full windows2019-py3

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

@max-arnold max-arnold commented Jan 16, 2020

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.

None yet

4 participants