Skip to content

fix(spark): Extracting spark_version from driver image - #785

Open
Akshat-Raj wants to merge 1 commit into
kubeflow:mainfrom
Akshat-Raj:fix-spark-780
Open

fix(spark): Extracting spark_version from driver image#785
Akshat-Raj wants to merge 1 commit into
kubeflow:mainfrom
Akshat-Raj:fix-spark-780

Conversation

@Akshat-Raj

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Currently, the only caller of build_spark_connect_cr does not use the spark version from the driver.image. Which means that it was defaulting to the DEFAULT_SPARK_VERSION in every case.

This PR fixes this conflict by:

  1. Extracting the spark version using regex from the driver image.
  2. Passing the extracted version to build_spark_connect_cr inside _create_session.

If a user doesn't provide an image, or uses a custom tag without a semantic version (e.g., latest), it falls back to returning None, preserving the existing default behavior.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):

Fixes #780

Checklist:

  • Docs included if any changes are user facing
    (Note: No doc changes needed as this does not make any user facing changes.)

Signed-off-by: Akshat Raj <akshatraj287@gmail.com>
Copilot AI balanced review requested due to automatic review settings September 6, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kramaranya for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Akshat-Raj Akshat-Raj changed the title Fix(spark): Extracting spark_version from driver image fix(spark): Extracting spark_version from driver image Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SparkConnect's notion of the Spark version isn't tied to the actual image

2 participants