You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2020/07/24 14:21:03 UTC

[spark] branch branch-3.0 updated: [SPARK-32363][PYTHON][BUILD][3.0] Fix flakiness in pip package testing in Jenkins

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new f50432f  [SPARK-32363][PYTHON][BUILD][3.0] Fix flakiness in pip package testing in Jenkins
f50432f is described below

commit f50432fd3d835f8b5de3283edce4c146cfafe827
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Fri Jul 24 07:18:15 2020 -0700

    [SPARK-32363][PYTHON][BUILD][3.0] Fix flakiness in pip package testing in Jenkins
    
    ### What changes were proposed in this pull request?
    
    This PR backports https://github.com/apache/spark/pull/29117 to branch-3.0 as the flakiness was found in branch-3.0 too: https://github.com/apache/spark/pull/29201#issuecomment-663114741 and https://github.com/apache/spark/pull/29201#issuecomment-663114741
    
    This PR proposes:
    
    - ~~Don't use `--user` in pip packaging test~~
    - ~~Pull `source` out of the subshell, and place it first.~~
    - Exclude user sitepackages in Python path during pip installation test
    
    to address the flakiness of the pip packaging test in Jenkins.
    
    ~~(I think) #29116 caused this flakiness given my observation in the Jenkins log. I had to work around by specifying `--user` but it turned out that it does not properly work in old Conda on Jenkins for some reasons. Therefore, reverting this change back.~~
    
    (I think) the installation at user site-packages affects other environments created by Conda in the old Conda version that Jenkins has. Seems it fails to isolate the environments for some reasons. So, it excludes user sitepackages in the Python path during the test.
    
    ~~In addition, #29116 also added some fallback logics of `conda (de)activate` and `source (de)activate` because Conda prefers to use `conda (de)activate` now per the official documentation and `source (de)activate` doesn't work for some reasons in certain environments (see also https://github.com/conda/conda/issues/7980). The problem was that `source` loads things to the current shell so does not affect the current shell. Therefore, this PR pulls `source` out of the subshell.~~
    
    Disclaimer: I made the analysis purely based on Jenkins machine's log in this PR. It may have a different reason I missed during my observation.
    
    ### Why are the changes needed?
    
    To make the build and tests pass in Jenkins.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, dev-only.
    
    ### How was this patch tested?
    
    Jenkins tests should test it out.
    
    Closes #29215 from HyukjinKwon/SPARK-32363-3.0.
    
    Authored-by: HyukjinKwon <gu...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 dev/run-pip-tests | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev/run-pip-tests b/dev/run-pip-tests
index 470f21e..81e33a6 100755
--- a/dev/run-pip-tests
+++ b/dev/run-pip-tests
@@ -68,6 +68,10 @@ PIP_OPTIONS="--upgrade --no-cache-dir --force-reinstall "
 PIP_COMMANDS=("pip install $PIP_OPTIONS $PYSPARK_DIST"
 	      "pip install $PIP_OPTIONS -e python/")
 
+# Jenkins has PySpark installed under user sitepackages shared for some reasons.
+# In this test, explicitly exclude user sitepackages to prevent side effects
+export PYTHONNOUSERSITE=1
+
 for python in "${PYTHON_EXECS[@]}"; do
   for install_command in "${PIP_COMMANDS[@]}"; do
     echo "Testing pip installation with python $python"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org