Skip to content

[AMORO-4301][ams] Fix Kubernetes executor label prefix - #4302

Merged
xxubai merged 2 commits into
apache:masterfrom
csurong:fix/spark-k8s-executor-labels
Jul 30, 2026
Merged

[AMORO-4301][ams] Fix Kubernetes executor label prefix#4302
xxubai merged 2 commits into
apache:masterfrom
csurong:fix/spark-k8s-executor-labels

Conversation

@csurong

@csurong csurong commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Why are the changes needed?

KUBERNETES_EXECUTOR_LABEL_PREFIX currently uses the driver label prefix. Because Spark options are stored by key in a map, the intended executor entries overwrite the same driver keys and no spark.kubernetes.executor.label.* options are emitted. Executor pods therefore miss Amoro's optimizer labels for observability and label-based operations.

Closes #4301.

Brief change log

  • Use spark.kubernetes.executor.label. for executor pod labels.
  • Add regression coverage for all optimizer labels on both driver and executor startup arguments.

How was this patch tested?

  • Added a regression test that fails before the prefix correction and passes after it.
  • mvn test -pl amoro-ams -am -Dtest=TestSparkOptimizerContainer -Dsurefire.failIfNoSpecifiedTests=false -Pskip-dashboard-build (JDK 11; 5 tests passed).
  • mvn validate -pl amoro-ams (JDK 11; Spotless and Checkstyle passed).
  • Screenshots for manual tests (not applicable; no UI change).

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Use Spark's executor label prefix for optimizer executor pods and add regression coverage for both driver and executor labels.
@github-actions github-actions Bot added the module:ams-server Ams server module label Jul 30, 2026

@zhoujinsong zhoujinsong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

Thanks for the fix.

@xxubai
xxubai merged commit efbedc3 into apache:master Jul 30, 2026
7 checks passed
xxubai pushed a commit that referenced this pull request Jul 31, 2026
Use Spark's executor label prefix for optimizer executor pods and add regression coverage for both driver and executor labels.

Co-authored-by: caosurong <surong.cao@thinkingdata.cn>
Co-authored-by: ZhouJinsong <zhoujinsong0505@163.com>
(cherry picked from commit efbedc3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Spark optimizer does not add Amoro labels to Kubernetes executor pods

3 participants