kubeflow / kubeflow/sdk

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

Open
#780 4 comments 0 reactions 1 assignee Claimed by @Akshat-Raj View on GitHub
area/spark kind/bug
Dominant language
Python
Stars
148
Forks
262
Avg merge
1d 2h
Merged PRs (30d)
1

Description

### What happened?

The SparkConnect CR construction utility allows the spark version to be configurable.

https://github.com/kubeflow/sdk/blob/3febcd7377d0cdb322bbb420207c3c26cbf7afd7/kubeflow/spark/backends/kubernetes/utils.py#L512

At the same time it's only caller does not leverage that provision.

https://github.com/kubeflow/sdk/blob/3febcd7377d0cdb322bbb420207c3c26cbf7afd7/kubeflow/spark/backends/kubernetes/backend.py#L151-L161

This provision is therefore a no-op and the spark version is always defaulted to `DEFAULT_SPARK_VERSION`.

https://github.com/kubeflow/sdk/blob/3febcd7377d0cdb322bbb420207c3c26cbf7afd7/kubeflow/spark/backends/kubernetes/constants.py#L44

This conflicts with the provision in the `Driver` dataclass to pass in a custom Spark image.

https://github.com/kubeflow/sdk/blob/3febcd7377d0cdb322bbb420207c3c26cbf7afd7/kubeflow/spark/types/types.py#L89

This provision can be leveraged from the public `connect` API.

https://github.com/kubeflow/sdk/blob/3febcd7377d0cdb322bbb420207c3c26cbf7afd7/kubeflow/spark/api/spark_client.py#L69

### What did you expect to happen?

There should not have been any conflict.

Possible solutions would be to make Spark version configurable, derive it from the image or to validate them both for version mismatch.

### Environment

Kubernetes version:
```bash
$ kubectl version

```
Kubeflow Trainer version:
```bash
$ kubectl get pods -n kubeflow -l app.kubernetes.io/name=trainer -o jsonpath="{.items[*].spec.containers[*].image}"

```
Kubeflow Python SDK version:
```bash
$ pip show kubeflow

```

### Impacted by this bug?

Give it a 👍 We prioritize the issues with most 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.