Skip to content

[SPARK-38392][K8S][TESTS] Add spark- prefix to namespaces and -driver suffix to drivers during IT#35711

Closed
martin-g wants to merge 1 commit intoapache:masterfrom
martin-g:k8s-test-names-improvement
Closed

[SPARK-38392][K8S][TESTS] Add spark- prefix to namespaces and -driver suffix to drivers during IT#35711
martin-g wants to merge 1 commit intoapache:masterfrom
martin-g:k8s-test-names-improvement

Conversation

@martin-g
Copy link
Member

@martin-g martin-g commented Mar 2, 2022

What changes were proposed in this pull request?

There are two small proposals:

  1. prefix the name of the temporary k8s namespaces with "spark-" so that the output of `kubectl get ns" is more clear.
  2. unify the name of the driver pod in non-test and IT tests to always use -driver as a suffix.

Why are the changes needed?

At the moment the name of the temporary namespace is just UUID without the -s. When one reads the result of kubectl get ns it is a bit cryptic to see UUIDs.

The names of the driver pods in ITs are not telling me that they are Drivers.
In non-test (i.e. production) the driver pod names are suffixed with -driver. I propose the same for IT tests.
Executor pods always use -exec- in their pod names, both in non-test and ITs.

Does this PR introduce any user-facing change?

Yes! Developers who debug IT tests will see more clear names now.

How was this patch tested?

Manually with kubectl get ns --watch and kubectl get po --watch.

…r pod in integration tests

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
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.

Hi, @martin-g . Apache Spark community uses [TESTS] in the PR title for test-only PRs.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-38392][K8S] Improve the names used for K8S namespace and driver pod in ITs [SPARK-38392][K8S][TESTS] Add spark- prefix to namespaces and -driver suffix to drivers during IT Mar 2, 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. I agree with you for both proposals.
(I'm testing K8s IT now).

@dongjoon-hyun
Copy link
Member

It's verified. Merged to master/3.2.

spark-d9d8d453f3fe4a79b7c44d32b72fb7dc   spark-pi-ac28d07f4bcaf9af-exec-1                         1/1     Running   0                2s
spark-d9d8d453f3fe4a79b7c44d32b72fb7dc   spark-test-app-5b1dbccd951f49088530709671455130-driver   1/1     Running   0                5s

dongjoon-hyun pushed a commit that referenced this pull request Mar 2, 2022
…ver` suffix to drivers during IT

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

There are two small proposals:
1) prefix the name of the temporary k8s namespaces with `"spark-"` so that the output of `kubectl get ns" is more clear.
2) unify the name of the driver pod in non-test and IT tests to always use `-driver` as a suffix.

### Why are the changes needed?

At the moment the name of the temporary namespace is just UUID without the `-`s. When one reads the result of `kubectl get ns` it is a bit cryptic to see UUIDs.

The names of the driver pods in ITs are not telling me that they are Drivers.
In non-test (i.e. production) the driver pod names are suffixed with `-driver`. I propose the same for IT tests.
Executor pods always use `-exec-` in their pod names, both in non-test and ITs.

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

Yes! Developers who debug IT tests will see more clear names now.

### How was this patch tested?

Manually with `kubectl get ns --watch` and `kubectl get po --watch`.

Closes #35711 from martin-g/k8s-test-names-improvement.

Authored-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 4d4c044)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

FYI, for test-only PRs, we can backport it into old release branches if needed.
Since this test PR is helpful, I backported it to branch-3.2 for Apache Spark 3.2.2 too.

@martin-g martin-g deleted the k8s-test-names-improvement branch March 2, 2022 20:21
kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…ver` suffix to drivers during IT

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

There are two small proposals:
1) prefix the name of the temporary k8s namespaces with `"spark-"` so that the output of `kubectl get ns" is more clear.
2) unify the name of the driver pod in non-test and IT tests to always use `-driver` as a suffix.

### Why are the changes needed?

At the moment the name of the temporary namespace is just UUID without the `-`s. When one reads the result of `kubectl get ns` it is a bit cryptic to see UUIDs.

The names of the driver pods in ITs are not telling me that they are Drivers.
In non-test (i.e. production) the driver pod names are suffixed with `-driver`. I propose the same for IT tests.
Executor pods always use `-exec-` in their pod names, both in non-test and ITs.

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

Yes! Developers who debug IT tests will see more clear names now.

### How was this patch tested?

Manually with `kubectl get ns --watch` and `kubectl get po --watch`.

Closes apache#35711 from martin-g/k8s-test-names-improvement.

Authored-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 4d4c044)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit ff1794f)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
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.

2 participants