Skip to content

Conversation

@tobiasstadler
Copy link
Contributor

What changes were proposed in this pull request?

Strip leading - from resource name prefix

Why are the changes needed?

leading - are not allowed for resource name prefix (especially spark.kubernetes.executor.podNamePrefix)

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit test

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@Yikun
Copy link
Member

Yikun commented Nov 3, 2022

@tobiasstadler Could you enable github action and do a rebase according guide?

@tobiasstadler
Copy link
Contributor Author

@Yikun Done

Copy link
Member

@Yikun Yikun left a comment

Choose a reason for hiding this comment

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

@dongjoon-hyun
Copy link
Member

Thank you for pinging me, @Yikun .

assert(KubernetesConf.getAppNameLabel("-" + "a" * 63) === "a" * 62)
}

test("SPARK-40869: KubernetesConf.getResourceNamePrefix creates invalid name prefixes") {
Copy link
Member

@dongjoon-hyun dongjoon-hyun Nov 3, 2022

Choose a reason for hiding this comment

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

The test case title is too broad. Shall we match it with the title?

- test("SPARK-40869: KubernetesConf.getResourceNamePrefix creates invalid name prefixes") {
+ test("SPARK-40869: Resource name prefix should not start with a hyphen") {

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-40869][K8S] Resource name prefix should not start with a - [SPARK-40869][K8S] Resource name prefix should not start with a hyper Nov 3, 2022
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-40869][K8S] Resource name prefix should not start with a hyper [SPARK-40869][K8S] Resource name prefix should not start with a hypen Nov 3, 2022
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-40869][K8S] Resource name prefix should not start with a hypen [SPARK-40869][K8S] Resource name prefix should not start with a hyphen Nov 3, 2022
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM (except a comment about test case name)

@dongjoon-hyun
Copy link
Member

I updated the test case name and verified manually. Let me merge this

[info] - SPARK-40869: Resource name prefix should not start with a hyphen (0 milliseconds)

dongjoon-hyun added a commit that referenced this pull request Nov 3, 2022
### What changes were proposed in this pull request?
Strip leading - from resource name prefix

### Why are the changes needed?
leading - are not allowed for resource name prefix (especially spark.kubernetes.executor.podNamePrefix)

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

### How was this patch tested?
Unit test

Closes #38331 from tobiasstadler/fix-SPARK-40869.

Lead-authored-by: Tobias Stadler <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 7f3b598)
Signed-off-by: Dongjoon Hyun <[email protected]>
dongjoon-hyun added a commit that referenced this pull request Nov 3, 2022
### What changes were proposed in this pull request?
Strip leading - from resource name prefix

### Why are the changes needed?
leading - are not allowed for resource name prefix (especially spark.kubernetes.executor.podNamePrefix)

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

### How was this patch tested?
Unit test

Closes #38331 from tobiasstadler/fix-SPARK-40869.

Lead-authored-by: Tobias Stadler <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 7f3b598)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Merged to master/3.3/3.2 for Apache Spark 3.4/3.3.2/3.2.3.

Welcome to the Apache Spark community, @tobiasstadler .
I added you to the contributor group and assigned SPARK-40869 to you.

Thank you again, @tobiasstadler , @srowen , @Yikun .

@tobiasstadler tobiasstadler deleted the fix-SPARK-40869 branch November 3, 2022 19:23
@tobiasstadler
Copy link
Contributor Author

Thank You!

SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?
Strip leading - from resource name prefix

### Why are the changes needed?
leading - are not allowed for resource name prefix (especially spark.kubernetes.executor.podNamePrefix)

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

### How was this patch tested?
Unit test

Closes apache#38331 from tobiasstadler/fix-SPARK-40869.

Lead-authored-by: Tobias Stadler <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
### What changes were proposed in this pull request?
Strip leading - from resource name prefix

### Why are the changes needed?
leading - are not allowed for resource name prefix (especially spark.kubernetes.executor.podNamePrefix)

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

### How was this patch tested?
Unit test

Closes apache#38331 from tobiasstadler/fix-SPARK-40869.

Lead-authored-by: Tobias Stadler <[email protected]>
Co-authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 7f3b598)
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants