-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-35280][K8S] Promote KubernetesUtils to DeveloperApi #32406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi, @attilapiros . Could you review this PR, please? |
|
Test build #138101 has finished for PR 32406 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Hi, @viirya . Could you review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found these two issues.
After they are addressed LGTM.
| } | ||
|
|
||
| @Since("3.2.0") | ||
| def loadPodFromTemplate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was introduced by https://issues.apache.org/jira/browse/SPARK-24434.
Which went into Spark 3.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in the PR title, the signature is change recently (2fa792a), @attilapiros .
I know that because I changed it. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the following PR description.
In this PR, Since annotations denote the last function signature changes because these are going to become public at Apache Spark 3.2.0.
| } | ||
|
|
||
| @Since("3.0.0") | ||
| def buildPodWithServiceAccount(serviceAccount: Option[String], pod: SparkPod): Option[Pod] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not released yet, @attilapiros ! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.4.8 RC3 will fail again. Please see this ancient bug fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to make them as DeveloperApi.
|
Thank you, @viirya and @attilapiros . |
|
Thank you so much for your review, @viirya and @attilapiros ! |
|
Then, I'll merge this with 2 approvals. :) |
Since SPARK-22757, `KubernetesUtils` has been used as an important utility class by all K8s modules and `ExternalClusterManager`s. This PR aims to promote `KubernetesUtils` to `DeveloperApi` in order to maintain it officially in a backward compatible way at Apache Spark 3.2.0. Apache Spark 3.1.1 makes `Kubernetes` module GA and provides an extensible external cluster manager framework. To have `ExternalClusterManager` for K8s environment, `KubernetesUtils` class is crucial and needs to be stable. By promoting to a subset of K8s developer API, we can maintain these more sustainable way and give a better and stable functionality to K8s users. In this PR, `Since` annotations denote the last function signature changes because these are going to become public at Apache Spark 3.2.0. | Version | Function Name | |-|-| | 2.3.0 | parsePrefixedKeyValuePairs | | 2.3.0 | requireNandDefined | | 2.3.0 | parsePrefixedKeyValuePairs | | 2.4.0 | parseMasterUrl | | 3.0.0 | requireBothOrNeitherDefined | | 3.0.0 | requireSecondIfFirstIsDefined | | 3.0.0 | selectSparkContainer | | 3.0.0 | formatPairsBundle | | 3.0.0 | formatPodState | | 3.0.0 | containersDescription | | 3.0.0 | containerStatusDescription | | 3.0.0 | formatTime | | 3.0.0 | uniqueID | | 3.0.0 | buildResourcesQuantities | | 3.0.0 | uploadAndTransformFileUris | | 3.0.0 | uploadFileUri | | 3.0.0 | requireBothOrNeitherDefined | | 3.0.0 | buildPodWithServiceAccount | | 3.0.0 | isLocalAndResolvable | | 3.1.1 | renameMainAppResource | | 3.1.1 | addOwnerReference | | 3.2.0 | loadPodFromTemplate | Yes, but this is new API additions. Pass the CIs. Closes apache#32406 from dongjoon-hyun/SPARK-35280. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
…erApi` ### What changes were proposed in this pull request? This PR aims to promote `SparkKubernetesClientFactory` as **stable** `DeveloperApi` in order to maintain it officially in a backward compatible way at Apache Spark 4.0.0. ### Why are the changes needed? Like SPARK-35280 and SPARK-37497, `SparkKubernetesClientFactory` is also able to be used to develop new `ExternalClusterManager` for K8s environment. - #32406 - #34751 ### Does this PR introduce _any_ user-facing change? No. Previously, it was `private[spark]`. ### How was this patch tested? Manual review because this is only a visibility change. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #42709 from dongjoon-hyun/SPARK-44995. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
…erApi` ### What changes were proposed in this pull request? This PR aims to promote `SparkKubernetesClientFactory` as **stable** `DeveloperApi` in order to maintain it officially in a backward compatible way at Apache Spark 4.0.0. ### Why are the changes needed? Like SPARK-35280 and SPARK-37497, `SparkKubernetesClientFactory` is also able to be used to develop new `ExternalClusterManager` for K8s environment. - apache#32406 - apache#34751 ### Does this PR introduce _any_ user-facing change? No. Previously, it was `private[spark]`. ### How was this patch tested? Manual review because this is only a visibility change. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#42709 from dongjoon-hyun/SPARK-44995. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit c596fce) Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
Since SPARK-22757,
KubernetesUtilshas been used as an important utility class by all K8s modules andExternalClusterManagers. This PR aims to promoteKubernetesUtilstoDeveloperApiin order to maintain it officially in a backward compatible way at Apache Spark 3.2.0.Why are the changes needed?
Apache Spark 3.1.1 makes
Kubernetesmodule GA and provides an extensible external cluster manager framework. To haveExternalClusterManagerfor K8s environment,KubernetesUtilsclass is crucial and needs to be stable. By promoting to a subset of K8s developer API, we can maintain these more sustainable way and give a better and stable functionality to K8s users.In this PR,
Sinceannotations denote the last function signature changes because these are going to become public at Apache Spark 3.2.0.Does this PR introduce any user-facing change?
Yes, but this is new API additions.
How was this patch tested?
Pass the CIs.