Fix startup Delta package resolution for Spark 4.x runtimes#25
Open
rjain21 wants to merge 1 commit intodelta-io:mainfrom
Open
Fix startup Delta package resolution for Spark 4.x runtimes#25rjain21 wants to merge 1 commit intodelta-io:mainfrom
rjain21 wants to merge 1 commit intodelta-io:mainfrom
Conversation
* Remove hardcoded Delta package/version from startup path. * Default DELTA_SPARK_VERSION to 4.1.0 while allowing env override. *Detect Spark major.minor at runtime and choose artifact: 4.1 -> delta-spark_4.1_2.13 4.0 -> delta-spark_4.0_2.13 fallback -> delta-spark_2.13 * Keep existing Spark session configs unchanged. * Update README with Spark-specific artifact guidance. * Add integration tests to validate startup artifact selection for Spark 4.1 and 4.0. Signed-off-by: Rajesh Jain <73859950+rjain21@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Docker image entrypoint (startup.sh) to choose a Spark-compatible Delta Lake Maven artifact at runtime (avoiding Spark 4.x linkage failures) and adds integration tests + README guidance to validate/document the selection behavior.
Changes:
- Detects the runtime Spark
major.minorversion instartup.shand selects an appropriatedelta-spark_*artifact coordinate. - Adds Docker integration tests to validate artifact selection for simulated Spark 4.1 and 4.0 runtimes.
- Updates README guidance for Spark 4.x Delta artifact coordinates.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
startup.sh |
Adds Spark version detection and selects Spark-specific Delta Maven artifacts for Spark 4.0/4.1. |
tests/test_docker.sh |
Adds integration tests that mock Spark binaries to verify startup.sh package selection logic. |
README.md |
Updates documentation to guide users toward Spark-version-specific Delta artifacts for Spark 4.x. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This PR fixes the default startup path for the Docker image so Delta is launched with the correct Spark compatible Maven artifact at runtime.
Problem
The startup flow used a hardcoded Delta artifact/version combination that did not match Spark 4.1 runtime behavior.
In Spark 4.x, Delta artifacts are Spark version specific. Using the generic artifact caused JVM linkage failures (
NoSuchMethodError) during Delta write initialization.Root Cause
Changes
startup.sh.DELTA_SPARK_VERSIONdefaults to4.1.0.major.minordetection.delta-spark_4.1_2.13:${DELTA_SPARK_VERSION}delta-spark_4.0_2.13:${DELTA_SPARK_VERSION}delta-spark_2.13:${DELTA_SPARK_VERSION}Validation
tests/test_docker.shto validate startup artifact selection for: