You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ru...@apache.org on 2025/06/19 02:12:58 UTC
(spark) branch master updated: [SPARK-52470][TESTS][FOLLOWUP] Fix test failure caused by import connect in pure classic testing envs
This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 8222670dba17 [SPARK-52470][TESTS][FOLLOWUP] Fix test failure caused by import connect in pure classic testing envs
8222670dba17 is described below
commit 8222670dba1791a289be08d9f01a52505175edd2
Author: Ruifeng Zheng <ru...@apache.org>
AuthorDate: Thu Jun 19 10:12:44 2025 +0800
[SPARK-52470][TESTS][FOLLOWUP] Fix test failure caused by import connect in pure classic testing envs
### What changes were proposed in this pull request?
Fix test failure caused by import connect in pure classic testing envs
### Why are the changes needed?
to fix failures in scheduled jobs like
https://github.com/apache/spark/actions/runs/15746558966/job/44384032554
### Does this PR introduce _any_ user-facing change?
no, test-only
### How was this patch tested?
will monitor the scheduled jobs
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #51220 from zhengruifeng/test_grpc.
Authored-by: Ruifeng Zheng <ru...@apache.org>
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
---
python/pyspark/ml/util.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py
index 3e55241b07e2..f9a532de10f9 100644
--- a/python/pyspark/ml/util.py
+++ b/python/pyspark/ml/util.py
@@ -40,7 +40,6 @@ from typing import (
from contextlib import contextmanager
from pyspark import since
-from pyspark.errors.exceptions.connect import SparkException
from pyspark.ml.common import inherit_doc
from pyspark.sql import SparkSession
from pyspark.sql.utils import is_remote
@@ -319,6 +318,8 @@ def try_remote_call(f: FuncT) -> FuncT:
return deserialize(properties)
if is_remote() and "PYSPARK_NO_NAMESPACE_SHARE" not in os.environ:
+ from pyspark.errors.exceptions.connect import SparkException
+
try:
return remote_call()
except SparkException as e:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org