Skip to content

Conversation

@zhengruifeng
Copy link
Contributor

@zhengruifeng zhengruifeng commented Jun 5, 2025

What changes were proposed in this pull request?

fix import error in classic-only envs:

  • pypy3.10
  • python3.11-classic-only
  • python3.13-nogil

Why are the changes needed?

https://github.com/apache/spark/actions/runs/15430761771/job/43428094456

Starting test(python3.11): pyspark.pipelines.tests.test_block_connect_access (temp output: /__w/spark/spark/python/target/e57e05b9-80f9-4149-9a9c-898cf497bd80/python3.11__pyspark.pipelines.tests.test_block_connect_access__wv66e6_5.log)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/__w/spark/spark/python/pyspark/pipelines/tests/test_block_connect_access.py", line 21, in <module>
    from pyspark.pipelines.block_connect_access import block_spark_connect_execution_and_analysis
  File "/__w/spark/spark/python/pyspark/pipelines/block_connect_access.py", line 21, in <module>
    from pyspark.sql.connect.proto.base_pb2_grpc import SparkConnectServiceStub
  File "/__w/spark/spark/python/pyspark/sql/connect/proto/__init__.py", line 18, in <module>
    from pyspark.sql.connect.proto.base_pb2_grpc import *
  File "/__w/spark/spark/python/pyspark/sql/connect/proto/base_pb2_grpc.py", line 19, in <module>
    import grpc
ModuleNotFoundError: No module named 'grpc'

Does this PR introduce any user-facing change?

no, test-only

How was this patch tested?

PR builder with

default: '{"PYSPARK_IMAGE_TO_TEST": "python-311-classic-only", "PYTHON_TO_TEST": "python3.11"}'

Was this patch authored or co-authored using generative AI tooling?

No

@zhengruifeng zhengruifeng requested a review from HyukjinKwon June 5, 2025 08:27
@github-actions github-actions bot removed the INFRA label Jun 5, 2025
@zhengruifeng zhengruifeng marked this pull request as ready for review June 5, 2025 08:55
@xinrong-meng
Copy link
Member

LGTM, would you retrigger the test? [error] java.lang.OutOfMemoryError: Java heap space

@zhengruifeng
Copy link
Contributor Author

thanks, merged to master

@zhengruifeng zhengruifeng deleted the fix_pp_no_grpc branch June 9, 2025 02:59
yhuang-db pushed a commit to yhuang-db/spark that referenced this pull request Jun 9, 2025
### What changes were proposed in this pull request?
fix import error in classic-only envs:

- pypy3.10
- python3.11-classic-only
- python3.13-nogil

### Why are the changes needed?

https://github.com/apache/spark/actions/runs/15430761771/job/43428094456

```
Starting test(python3.11): pyspark.pipelines.tests.test_block_connect_access (temp output: /__w/spark/spark/python/target/e57e05b9-80f9-4149-9a9c-898cf497bd80/python3.11__pyspark.pipelines.tests.test_block_connect_access__wv66e6_5.log)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/__w/spark/spark/python/pyspark/pipelines/tests/test_block_connect_access.py", line 21, in <module>
    from pyspark.pipelines.block_connect_access import block_spark_connect_execution_and_analysis
  File "/__w/spark/spark/python/pyspark/pipelines/block_connect_access.py", line 21, in <module>
    from pyspark.sql.connect.proto.base_pb2_grpc import SparkConnectServiceStub
  File "/__w/spark/spark/python/pyspark/sql/connect/proto/__init__.py", line 18, in <module>
    from pyspark.sql.connect.proto.base_pb2_grpc import *
  File "/__w/spark/spark/python/pyspark/sql/connect/proto/base_pb2_grpc.py", line 19, in <module>
    import grpc
ModuleNotFoundError: No module named 'grpc'
```

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

### How was this patch tested?
PR builder with
```
default: '{"PYSPARK_IMAGE_TO_TEST": "python-311-classic-only", "PYTHON_TO_TEST": "python3.11"}'
```

### Was this patch authored or co-authored using generative AI tooling?
No

Closes apache#51094 from zhengruifeng/fix_pp_no_grpc.

Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants