Repository navigation
chore(spark): replace pyspark-connect with pyspark-client (#781) - #795
Conversation
|
🎉 Welcome to the Kubeflow SDK! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
|
/ok-to-test |
49c3a08 to
0dabf64
Compare
|
Hi @Neha-Nimsatkar thanks for this PR. Can you add a short Optionally mention the Overall this looks good to me from a functionality and safety perspective. Nice work on #781! |
e278360 to
b3ac44c
Compare
|
@RobuRishabh Thanks for the review!
All pre-commit checks and DCO sign-offs are in place. Ready for your final look! |
|
/lgtm |
|
/assign @astefanutti |
|
We should remove the changelog. It’s auto-generated as part of cliff.toml. |
Signed-off-by: Neha-Nimsatkar <1492neha@gmail.com>
b3ac44c to
d18046b
Compare
Thanks @tariq-hasan , I have Reverted the changelog file and squashed down to a single clean commit . |
|
/lgtm Hi @andreyvelich @astefanutti @kramaranya @Electronic-Waste this PR has a direct security impact worth prioritizing. The current pyspark-connect dependency pulls in the full pyspark package (324 bundled JARs) including CVE-prone Java libraries (Jackson, Netty, Log4j components, Hadoop, etc.) that the SDK never uses, it only talks to Spark Connect servers over gRPC. Vulnerability scanners flag these JARs, creating noise and blocking deployments for teams with compliance gates. Switching to pyspark-client drops these JARs, removes py4j and zstandard, fixes the 4.2.0→4.0.4 version skew, and all CI checks (including E2E) are green. It's a drop-in replacement with no API changes. Could we get /approve when you get a chance? Thanks! |
|
/lgtm |
|
@astefanutti for merge. |
andreyvelich
left a comment
There was a problem hiding this comment.
Thanks for this work everyone!
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich, Shekharrajak The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…) (kubeflow#795) Signed-off-by: Neha-Nimsatkar <1492neha@gmail.com> Signed-off-by: digvijay-y <144053736+digvijay-y@users.noreply.github.com>
What this PR does / why we need it:
Replaces the heavy
pyspark-connectdependency withpyspark-clientto remove unnecessary JVM/JAR runtime dependencies from the client environment while maintaining remote Spark Connect functionality (sc://).Audit & Investigation Findings:
.jarcount in.venvfrom 324 down to 0 (find .venv -name '*.jar' | wc -lreturned 0).pyspark==4.2.0andpy4j==0.10.9.9.pyspark-clientto version4.0.4(matchingDEFAULT_SPARK_VERSIONandapache/spark:4.0.4), eliminating client/server protocol skew and preventing unintended runtime drift from floating4.2.0.from pyspark.sql import SparkSessionimports cleanly without JVM dependencies.Local Verification:
make verify(linting, formatting, and type checks passed)make test-python(695/695 unit tests passed)test_spark_connect_crd_smokepassedCHANGELOG/CHANGELOG-0.5.mdcoveringpyspark-clientmigration,sc://remote requirement, and JAR/Py4J removal.Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...format, will close the issue(s) when PR gets merged):Fixes #781
Checklist: