You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by la...@apache.org on 2023/06/13 05:43:24 UTC
[kudu] 02/15: [build-support] unset *_proxy env variables for Python tests
This is an automated email from the ASF dual-hosted git repository.
laiyingchun pushed a commit to branch branch-1.17.x
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 71f1f77e562933e5324f23761822c10557997650
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Mon Jun 5 14:20:20 2023 -0700
[build-support] unset *_proxy env variables for Python tests
The environment of a Jenkins node might have HTTP/HTTPS proxy configured
to proxy HTTP requests even for 127.0.0.0/8 network and other quirks.
Since Python Kudu tests don't assume any proxying of HTTP/HTTPS requests
to Kudu components listening on 127.0.0.0/8 and other addresses,
let's explicitly unset environment variables that might affect behavior
of the Python libraries like urllib/urllib2 [1][2].
The motivation for this change was observing failures of the new Python
tests introduced with 8c546ae7f560deebb32cb04815377f74470643c6 when
running pre-commit Jenkins jobs on nodes of some peculiar network
configuration.
[1] https://docs.python.org/3/library/urllib.request.html
[2] https://docs.python.org/2/library/urllib2.html
Change-Id: I5a4d785e1eddf3b66c897a23f6b6c5d0b92392de
Reviewed-on: http://gerrit.cloudera.org:8080/20012
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
(cherry picked from commit 459207ff5c103e7d4d60d974504eb8633e188d15)
Reviewed-on: http://gerrit.cloudera.org:8080/20044
Reviewed-by: Yingchun Lai <la...@apache.org>
---
build-support/jenkins/build-and-test.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index a76476a88..c6f0ce774 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -639,9 +639,20 @@ if [ "$BUILD_PYTHON" == "1" ]; then
# Build the Python bindings. This assumes we run this script from base dir.
CC=$CLANG CXX=$CLANG++ python setup.py build_ext
- set +e
+
+ # A testing environment might have HTTP/HTTPS proxy configured to proxy
+ # requests even for 127.0.0.0/8 network or other quirks. Since some Python
+ # Kudu tests rely on Kudu components listening on 127.0.0.0/8 addresses,
+ # let's unset environment variables that might affect behavior of the
+ # Python libraries like urllib/urllib2.
+ unset ALL_PROXY
+ unset HTTP_PROXY
+ unset HTTPS_PROXY
+ unset http_proxy
+ unset https_proxy
# Run the Python tests. This may also involve some compiler work.
+ set +e
if ! CC=$CLANG CXX=$CLANG++ python setup.py test \
--addopts="kudu --junit-xml=$TEST_LOGDIR/python_client.xml" \
2> $TEST_LOGDIR/python_client.log ; then