Skip to content

[SPARK-56736][K8S] Add sparkVersion method to KubernetesConf abstract class#55697

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-56736
Closed

[SPARK-56736][K8S] Add sparkVersion method to KubernetesConf abstract class#55697
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-56736

Conversation

@dongjoon-hyun
Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun commented May 6, 2026

What changes were proposed in this pull request?

This PR adds a sparkVersion: String method on KubernetesConf and uses it in KubernetesDriverConf.labels and KubernetesExecutorConf.labels instead of referencing the SPARK_VERSION constant directly.

Why are the changes needed?

Exposing the version through an overridable method gives subclasses (e.g., the Spark K8s operator) a single extension point to customize the SPARK_VERSION_LABEL value.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs with the newly added test cases.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-56736] Add sparkVersion method to KubernetesConf abstract class [SPARK-56736][K8S] Add sparkVersion method to KubernetesConf abstract class May 6, 2026
@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Could you review this PR, @yaooqinn ?

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

While auditing SPARK-56603 Improve K8s Resource Manager API, I found that this is required to be complete. I hope we can land this to Apache Spark 4.2.0.

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Thank you, @yaooqinn and @HyukjinKwon .
Merged to master/branch-4.x/branch-4.2

dongjoon-hyun added a commit that referenced this pull request May 6, 2026
…ract class

### What changes were proposed in this pull request?

This PR adds a `sparkVersion: String` method on `KubernetesConf` and uses it in `KubernetesDriverConf.labels` and `KubernetesExecutorConf.labels` instead of referencing the `SPARK_VERSION` constant directly.

### Why are the changes needed?

Exposing the version through an overridable method gives subclasses (e.g., the Spark K8s operator) a single extension point to customize the `SPARK_VERSION_LABEL` value.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs with the newly added test cases.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

Closes #55697 from dongjoon-hyun/SPARK-56736.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 2e59054)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun added a commit that referenced this pull request May 6, 2026
…ract class

### What changes were proposed in this pull request?

This PR adds a `sparkVersion: String` method on `KubernetesConf` and uses it in `KubernetesDriverConf.labels` and `KubernetesExecutorConf.labels` instead of referencing the `SPARK_VERSION` constant directly.

### Why are the changes needed?

Exposing the version through an overridable method gives subclasses (e.g., the Spark K8s operator) a single extension point to customize the `SPARK_VERSION_LABEL` value.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs with the newly added test cases.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

Closes #55697 from dongjoon-hyun/SPARK-56736.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 2e59054)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-56736 branch May 6, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants