From 59bae2530daddc760c2ca8493866abc136b75c36 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:37:39 -0700 Subject: [PATCH 1/2] add a default of 3 retries --- tools/azure-sdk-tools/pypi_tools/pypi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/azure-sdk-tools/pypi_tools/pypi.py b/tools/azure-sdk-tools/pypi_tools/pypi.py index 08fa20691755..5d41d4330f19 100644 --- a/tools/azure-sdk-tools/pypi_tools/pypi.py +++ b/tools/azure-sdk-tools/pypi_tools/pypi.py @@ -14,7 +14,7 @@ def get_pypi_xmlrpc_client(): class PyPIClient: def __init__(self, host="https://pypi.org"): self._host = host - self._http = PoolManager(retries=Retry(raise_on_status=True)) + self._http = PoolManager(retries=Retry(total=3, raise_on_status=True)) def project(self, package_name): response = self._http.request( From 87d3be40df44b552e3161e04c4a2a3cf075b3fd0 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:10:25 -0700 Subject: [PATCH 2/2] allow urllib3 to get access to the cert bundle from certifi --- scripts/devops_tasks/trust_proxy_cert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/devops_tasks/trust_proxy_cert.py b/scripts/devops_tasks/trust_proxy_cert.py index 57ddb4b5d3ed..7c767179d57e 100644 --- a/scripts/devops_tasks/trust_proxy_cert.py +++ b/scripts/devops_tasks/trust_proxy_cert.py @@ -33,7 +33,10 @@ def combine_cert_file(): print("Set the following certificate paths:") print("\tSSL_CERT_DIR={}".format(os.path.dirname(COMBINED_LOCATION))) print("\tREQUESTS_CA_BUNDLE={}".format(COMBINED_LOCATION)) + print("\tDEFAULT_CA_BUNDLE_PATH={}".format(COMBINED_LOCATION)) if os.getenv('TF_BUILD', False): print("##vso[task.setvariable variable=SSL_CERT_DIR]{}".format(os.path.dirname(COMBINED_LOCATION))) print("##vso[task.setvariable variable=REQUESTS_CA_BUNDLE]{}".format(COMBINED_LOCATION)) + print("##vso[task.setvariable variable=DEFAULT_CA_BUNDLE_PATH]{}".format(COMBINED_LOCATION)) +