Skip to content

Commit

Permalink
[SPARK-44544][INFRA] Deduplicate run_python_packaging_tests
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
it seems that `run_python_packaging_tests` requires some disk space and cause some pyspark modules fail, this PR is to make `run_python_packaging_tests` only enabled within `pyspark-errors` (which is the smallest pyspark test module)

![image](https://github.com/apache/spark/assets/7322292/2d37c141-15b8-4d9f-bfbd-4dd7782ab62e)

### Why are the changes needed?

1, it seems it is the `run_python_packaging_tests` that cause the `No space left` error;
2, the `run_python_packaging_tests` is tested in all `pyspark-*` test modules, should be deduplicated;

### Does this PR introduce _any_ user-facing change?
no, infra-only

### How was this patch tested?
updated CI

Closes apache#42146 from zhengruifeng/infra_skip_py_packing_tests.

Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
  • Loading branch information
zhengruifeng committed Jul 26, 2023
1 parent ac8fe83 commit 748eaff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ jobs:
HIVE_PROFILE: ${{ matrix.hive }}
GITHUB_PREV_SHA: ${{ github.event.before }}
SPARK_LOCAL_IP: localhost
SKIP_PACKAGING: true
steps:
- name: Checkout Spark repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -344,6 +345,8 @@ jobs:
java:
- ${{ inputs.java }}
modules:
- >-
pyspark-errors
- >-
pyspark-sql, pyspark-mllib, pyspark-resource, pyspark-testing
- >-
Expand All @@ -353,7 +356,7 @@ jobs:
- >-
pyspark-pandas-slow
- >-
pyspark-connect, pyspark-errors
pyspark-connect
- >-
pyspark-pandas-connect
- >-
Expand All @@ -366,6 +369,7 @@ jobs:
SPARK_LOCAL_IP: localhost
SKIP_UNIDOC: true
SKIP_MIMA: true
SKIP_PACKAGING: true
METASPACE_SIZE: 1g
steps:
- name: Checkout Spark repository
Expand Down Expand Up @@ -414,14 +418,20 @@ jobs:
python3.9 -m pip list
pypy3 -m pip list
- name: Install Conda for pip packaging test
if: ${{ matrix.modules == 'pyspark-errors' }}
run: |
curl -s https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
# Run the tests.
- name: Run tests
env: ${{ fromJSON(inputs.envs) }}
shell: 'script -q -e -c "bash {0}"'
run: |
export PATH=$PATH:$HOME/miniconda/bin
if [[ "$MODULES_TO_TEST" == "pyspark-errors" ]]; then
export PATH=$PATH:$HOME/miniconda/bin
export SKIP_PACKAGING=false
echo "Python Packaging Tests Enabled!"
fi
./dev/run-tests --parallelism 1 --modules "$MODULES_TO_TEST"
- name: Upload coverage to Codecov
if: fromJSON(inputs.envs).PYSPARK_CODECOV == 'true'
Expand Down Expand Up @@ -457,6 +467,7 @@ jobs:
GITHUB_PREV_SHA: ${{ github.event.before }}
SPARK_LOCAL_IP: localhost
SKIP_MIMA: true
SKIP_PACKAGING: true
steps:
- name: Checkout Spark repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -911,6 +922,7 @@ jobs:
SPARK_LOCAL_IP: localhost
ORACLE_DOCKER_IMAGE_NAME: gvenzl/oracle-xe:21.3.0
SKIP_MIMA: true
SKIP_PACKAGING: true
steps:
- name: Checkout Spark repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def run_python_tests(test_modules, parallelism, with_coverage=False):


def run_python_packaging_tests():
if not os.environ.get("SPARK_JENKINS"):
if not os.environ.get("SPARK_JENKINS") and os.environ.get("SKIP_PACKAGING", "false") != "true":
set_title_and_block("Running PySpark packaging tests", "BLOCK_PYSPARK_PIP_TESTS")
command = [os.path.join(SPARK_HOME, "dev", "run-pip-tests")]
run_cmd(command)
Expand Down

0 comments on commit 748eaff

Please sign in to comment.