This is an automated email from the ASF dual-hosted git repository.
HyukjinKwon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-rust.git
The following commit(s) were added to refs/heads/master by this push:
new aad559aa [SPARK-61323][CONNECT][INFRA][TESTS] Run the Arrow UDTF, plot
and query-execution tests of the official Connect suites in CI
aad559aa is described below
commit aad559aaa5df61312e490dceb7c1a3b205d23777
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Nov 10 09:43:07 2026 +0900
[SPARK-61323][CONNECT][INFRA][TESTS] Run the Arrow UDTF, plot and
query-execution tests of the official Connect suites in CI
### What changes were proposed in this pull request?
[SPARK-61323](https://issues.apache.org/jira/browse/SPARK-61323): run the
official Connect tests that CI was skipping although they pass.
- `scripts/run_official_tests.py`: the drop-in runner removes
`SPARK_SKIP_CONNECT_COMPAT_TESTS` for its own test processes. The drop-in's
`is_remote_only()` is true without it, and the official `test_parity_udtf.py`
skips its whole Arrow UDTF suite whenever it is set. The transport runner keeps
setting it, because the official base classes
(`pyspark/testing/connectutils.py`) build a classic session in `setUpClass`
unless `is_remote_only()` is true: without it every test of the file er [...]
- `.github/workflows/build_python_connect.yml`: the connect-parity and
connect-dropin jobs install `plotly<6.0.0` and `graphviz==0.20.3`, the pins of
Apache Spark's own connect job, so
`sql/tests/connect/test_parity_frame_plot_plotly.py`, the graphviz test of
`test_df_debug.py`, and our own
`test_pandas_api_takes_its_index_and_plot_is_of_pyspark` (which does
`importorskip("plotly")`) run instead of skipping.
- `scripts/dropin_known_failures.txt`: the reason of
`test_recursion_handling_for_plan_logging` said the reference fails it too. The
reference passes it; ours fails at the test's use of `spark._client` and
`DataFrame._plan.to_proto`, by design.
### Why are the changes needed?
CI reported these suites green while 131 Arrow UDTF parity tests, 12 plot
tests, a query-execution metrics test and one of our own live tests never ran.
### Does this PR introduce _any_ user-facing change?
No, CI only.
### How was this patch tested?
Locally, against a Spark 4.3.0 Connect server, through
`scripts/run_official_tests.py` as CI runs it:
- `test_parity_udtf.py` on the drop-in without the variable: 387 passed, 0
failed, 21 skipped (with it: 130 passed, 145 skipped for `-k ArrowUDTF`).
Through the transport without it: 275 setup errors, so it stays set there; the
same holds for the pandas parity gate, which is unchanged.
- With plotly and graphviz importable, on the drop-in: `test_df_debug.py` 7
passed, `test_parity_frame_plot_plotly.py` 12 passed (the reference passes the
plot file too); our `test_pandas_api_takes_its_index_and_plot_is_of_pyspark`
passes.
- `scripts/tests` (24 passed); both workflows load as YAML.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
This pull request and its description were written by Isaac.
Closes #443 from HyukjinKwon/SPARK-61323-ci-hidden-tests.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
.github/workflows/build_python_connect.yml | 16 ++++++++++++----
scripts/dropin_known_failures.txt | 2 +-
scripts/run_official_tests.py | 10 +++++++++-
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/build_python_connect.yml
b/.github/workflows/build_python_connect.yml
index c847e4c5..eef6bf28 100644
--- a/.github/workflows/build_python_connect.yml
+++ b/.github/workflows/build_python_connect.yml
@@ -42,7 +42,11 @@ env:
RUST_PARITY_LOG_DIR: /tmp/parity-test-logs
SPARK_CONNECT_TESTING_REMOTE: sc://localhost:15002
SPARK_TESTING: "1"
- SPARK_SKIP_CONNECT_COMPAT_TESTS: "1" # force remote-only (pure connect, no
local JVM)
+ # Read by the transport gate (run_official_tests.py sets it for its own
runs: the official
+ # base classes need is_remote_only()) and by the Spark server started below,
as Apache's CI
+ # sets it for its connect job. The drop-in runner removes it for its own
runs, because the
+ # official Arrow UDTF suite skips itself when it is set (see run_ours).
+ SPARK_SKIP_CONNECT_COMPAT_TESTS: "1"
jobs:
# ---------------------------------------------------------------------------
@@ -101,7 +105,10 @@ jobs:
python -m pip install --upgrade pip
# Match the supported pandas 2.x environment used by
pandas-parity.yml.
# Spark 4.2's tests and Python workers are not compatible with
pandas 3.x.
- python -m pip install pytest 'pandas>=2.2,<3.0' pyarrow numpy grpcio
grpcio-status googleapis-common-protos cloudpickle zstandard py4j
+ # plotly and graphviz are the optional packages Apache's connect job
installs (pins as
+ # in Apache's build_python_connect.yml). Without them the
DataFrame.plot tests
+ # (sql/tests/connect/test_parity_frame_plot_plotly.py) and
test_df_debug.py skip.
+ python -m pip install pytest 'pandas>=2.2,<3.0' pyarrow numpy grpcio
grpcio-status googleapis-common-protos cloudpickle zstandard py4j
'plotly<6.0.0' graphviz==0.20.3
- name: Build the Rust extension into the skin
# The parity diff drives both clients via PYTHONPATH (our ./python for
ours,
@@ -341,8 +348,9 @@ jobs:
# Same environment as the parity gate (pandas 2.x; Spark 4.2+ is not
compatible
# with pandas 3). torch and scikit-learn are NOT installed: the ML
tests that need
# them skip themselves (pyspark.testing guards), and the torch-based
pyspark.ml.connect
- # files are by design (scripts/dropin_known_failures.txt).
- python -m pip install pytest 'pandas>=2.2,<3.0' pyarrow numpy grpcio
grpcio-status googleapis-common-protos cloudpickle zstandard py4j
+ # files are by design (scripts/dropin_known_failures.txt). plotly
and graphviz are
+ # installed (pins as Apache's connect job): their tests run here,
not skip.
+ python -m pip install pytest 'pandas>=2.2,<3.0' pyarrow numpy grpcio
grpcio-status googleapis-common-protos cloudpickle zstandard py4j
'plotly<6.0.0' graphviz==0.20.3
- name: Build the Rust extension into the skin
run: |
diff --git a/scripts/dropin_known_failures.txt
b/scripts/dropin_known_failures.txt
index 09ce1b6f..91edcc87 100644
--- a/scripts/dropin_known_failures.txt
+++ b/scripts/dropin_known_failures.txt
@@ -39,4 +39,4 @@
pyspark/sql/tests/connect/test_parity_dataframe.py::DataFrameParityTests::test_m
pyspark/sql/tests/connect/test_parity_window.py::DataFrameParityTests::test_metadata_column
# same test-only 'testcat' InMemoryCatalog as the DataFrame test; the
reference fails it too
# --- tests by design for the drop-in ---
-pyspark/sql/tests/connect/test_connect_error.py::SparkConnectErrorTests::test_recursion_handling_for_plan_logging
# logs the Python plan of a deep DataFrame; the Rust core builds plans, so
DataFrame._plan has no Python proto (dev/parity/known-differences.md)
+pyspark/sql/tests/connect/test_connect_error.py::SparkConnectErrorTests::test_recursion_handling_for_plan_logging
# by design: the official 4.3.0 reference passes it on the same server; ours
fails at the test's spark._client / DataFrame._plan.to_proto (the Rust core
builds plans, so there is no Python proto; dev/parity/known-differences.md)
diff --git a/scripts/run_official_tests.py b/scripts/run_official_tests.py
index 4f47af14..916f2dfe 100755
--- a/scripts/run_official_tests.py
+++ b/scripts/run_official_tests.py
@@ -243,13 +243,21 @@ def run_ours(
env = dict(os.environ)
env["SPARK_CONNECT_TESTING_REMOTE"] = remote
env["SPARK_TESTING"] = "1"
- env["SPARK_SKIP_CONNECT_COMPAT_TESTS"] = "1"
if dropin:
# The drop-in itself: no transport. scripts/ is on the path only for
the deselect
# plugin; spark_py (the overlay) comes first, so our pyspark is the
one imported.
+ # The variable is removed, not set: the drop-in's is_remote_only() is
True without
+ # it (python/pyspark/util.py), and the official test_parity_udtf.py
skips its Arrow
+ # UDTF suite whenever it is set. The workflow sets it for the Spark
server process.
+ env.pop("SPARK_SKIP_CONNECT_COMPAT_TESTS", None)
env["PYTHONPATH"] = os.pathsep.join([str(spark_py), str(REPO /
"scripts")])
plugin = "dropin_deselect_plugin"
else:
+ # Transport mode runs the reference pyspark (its tree has
pyspark/core/). The base
+ # classes of the official connect tests
(pyspark/testing/connectutils.py, setUpClass)
+ # build a classic session unless is_remote_only() is True, which this
variable forces;
+ # without it they error at setup.
+ env["SPARK_SKIP_CONNECT_COMPAT_TESTS"] = "1"
env["PYTHONPATH"] = os.pathsep.join([str(REPO / "scripts"),
str(spark_py)])
env["RUST_PYSPARK_SO"] = os.environ["RUST_PYSPARK_SO"]
plugin = "rust_transport_plugin"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]