test(e2e): run SparkConnect query on the Connect server, not a local … #3239
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 241 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.328
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3239"
general
weight: 0.35
tariq-hasan
Purpose of this PR
Fixes #3238
test/e2e/sparkconnect_query_test.goran its query inspark-shell --master 'local[1]'. In Spark 4.x,SparkSession.builder()defaults to the Classic implementation, and.remote()only sets a config key. SogetOrCreate()returned the REPL's local session, and the query never reached the Spark Connect server. The test would pass even with no server running.Proposed changes:
spark-shell --remote sc://<svc>:15002). Itssparksession is bound to the server.script -qecso the Ammonite REPL gets the/dev/ttyit needs underkubectl exec -i.SESSION_CLASS=org.apache.spark.sql.connect.SparkSession, so the test fails if the query falls back to a local session.Change Category
Rationale
Checked locally against Spark 4.0.4 with a standalone Connect server:
org.apache.spark.sql.classic.SparkSessionwith app nameSpark shell, and the server logged no requests.spark-shell --remotewith piped stdin and no TTY fails withcannot open /dev/tty.script -qec, it gotorg.apache.spark.sql.connect.SparkSession, reported the server's app name, and printedROW_COUNT=100andVALIDATE=14.Checklist
Additional Notes
go vetandgofmtare clean intest/e2e. I haven't run the e2e suite on kind locally; I'm relying on CI for that.