Repository navigation
[CHORE] Make the PySpark test suite hermetic - #654
Closed
Roel Bollens (RoelBollens-TomTom) wants to merge 1 commit into
Closed
Roel Bollens (RoelBollens-TomTom) wants to merge 1 commit into
Roel Bollens (RoelBollens-TomTom) wants to merge 1 commit into
Conversation
❌ PR Title Validation FailedError: Unknown release type "Chore" found in pull request title "[Chore] Make the PySpark test suite hermetic". Available types:
Examples:
See the Overture Maps Foundation GitHub usage guidelines for full documentation. |
Roel Bollens (RoelBollens-TomTom)
temporarily deployed
to
staging
August 11, 2026 19:02 — with
GitHub Actions
Inactive
🗺️ Schema reference docs preview is live!
Note ♻️ This preview updates automatically with each push to this PR. |
Roel Bollens (RoelBollens-TomTom)
force-pushed
the
pyspark-hermetic-tests
branch
from
August 11, 2026 19:19
c456993 to
755db29
Compare
Roel Bollens (RoelBollens-TomTom)
temporarily deployed
to
staging
August 11, 2026 19:21 — with
GitHub Actions
Inactive
Roel Bollens (RoelBollens-TomTom)
force-pushed
the
pyspark-hermetic-tests
branch
from
August 11, 2026 19:35
755db29 to
bfa1422
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PySpark test suite depended on machine state in two ways: ambient Spark/JVM configuration leaked into the test JVM, and the JVM itself came from whatever Java the system resolves. This makes the venv own both.
Environment scrubbing (
tests/conftest.py)PYSPARK_SUBMIT_ARGS,SPARK_CONF_DIR,HADOOP_CONF_DIR,YARN_CONF_DIR,JAVA_TOOL_OPTIONS,_JAVA_OPTIONS,JDK_JAVA_OPTIONSat conftest import.SPARK_HOMEto the venv's bundled pyspark distribution andPYSPARK_PYTHON/PYSPARK_DRIVER_PYTHONtosys.executable(hard-set, notsetdefault).SPARK_LOCAL_IPis deliberately left alone — it exists to make local sessions work (macOS/VPN hostname resolution).Bundled JDK (
jdk4pydev dependency)jdk4py>=17.0.9.2,<22, marker-gated to darwin/linux:lowest-directresolution picks 17.0.9.2 (JDK 17), matching pyspark 3.4's supported ceiling — so the conditionalsetup-javastep in the workflow is gone entirely.Caveat worth reviewing: jdk4py's runtime is jlink-stripped and lacks
jdk.incubator.vector, which Spark 4.x passes to every JVM via--add-modules(fatal when missing; upstream declined to bundle it). The conftest therefore exposes the JDK through a mirroredJAVA_HOMEwhosebin/javais a 7-line POSIX wrapper dropping that single flag — the module only enables vectorized BLAS, which Spark treats as optional at runtime. On platforms without a jdk4py wheel or a POSIX shell (Windows, BSD, musl) the marker skips the install and the conftest falls back to the system Java, i.e. today's behavior.Verified locally
SPARK_HOME→ a real Spark 3.5.3 install,PYSPARK_SUBMIT_ARGS='--master yarn',JAVA_TOOL_OPTIONS='-Xmx1m'. Before this change that environment produces mass'JavaPackage' object is not callableerrors.JAVA_HOME=/nonexistent-java— still green, proving the bundled JDK is the one running.