This is an automated email from the ASF dual-hosted git repository.

dongjoon-hyun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 301c515a [SPARK-60082] Deduplicate the remaining E2E 
`SparkApplication` fixtures
301c515a is described below

commit 301c515abbded70e4c6fa9dc92f4e73cb5950130
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Oct 8 05:06:10 2026 -0700

    [SPARK-60082] Deduplicate the remaining E2E `SparkApplication` fixtures
    
    ### What changes were proposed in this pull request?
    
    As a follow-up of SPARK-59958, this PR aims to deduplicate the remaining 
E2E `SparkApplication` fixtures.
    
    - Replace `tests/e2e/kueue/spark-example.yaml` with the shared 
`tests/e2e/fixtures/spark-application/spark-example.yaml`.
    - Merge 
`tests/e2e/fixtures/spark-application/spark-application-succeeded.yaml` into 
`spark-example.yaml`. They differ only in the image. This PR keeps 
`apache/spark:{{SPARK_VERSION}}-scala`, which is 
`apache/spark:{{SPARK_VERSION}}` without Python.
    
    ### Why are the changes needed?
    
    To reduce the maintenance cost. For example, a Spark version upgrade needs 
to update `sparkVersion` in 18 E2E files instead of 20.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 5.5
    
    Closes #958 from dongjoon-hyun/SPARK-60082.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 tests/e2e/events/chainsaw-test.yaml                |  2 +-
 .../spark-application-succeeded.yaml               | 31 --------------------
 tests/e2e/kueue/chainsaw-test.yaml                 | 10 ++++++-
 tests/e2e/kueue/spark-example.yaml                 | 34 ----------------------
 tests/e2e/state-transition/chainsaw-test.yaml      |  2 +-
 5 files changed, 11 insertions(+), 68 deletions(-)

diff --git a/tests/e2e/events/chainsaw-test.yaml 
b/tests/e2e/events/chainsaw-test.yaml
index aba2985e..9032b6a1 100644
--- a/tests/e2e/events/chainsaw-test.yaml
+++ b/tests/e2e/events/chainsaw-test.yaml
@@ -46,7 +46,7 @@ spec:
             value: default
           - name: SPARK_APPLICATION_NAME
             value: spark-job-succeeded-events-test
-        file: "../fixtures/spark-application/spark-application-succeeded.yaml"
+        file: "../fixtures/spark-application/spark-example.yaml"
     - assert:
         bindings:
           - name: SPARK_APP_NAMESPACE
diff --git 
a/tests/e2e/fixtures/spark-application/spark-application-succeeded.yaml 
b/tests/e2e/fixtures/spark-application/spark-application-succeeded.yaml
deleted file mode 100644
index be9b31d3..00000000
--- a/tests/e2e/fixtures/spark-application/spark-application-succeeded.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-apiVersion: spark.apache.org/v1
-kind: SparkApplication
-metadata:
-  name: ($SPARK_APPLICATION_NAME)
-  namespace: ($SPARK_APP_NAMESPACE)
-spec:
-  mainClass: "org.apache.spark.examples.SparkPi"
-  jars: "local:///opt/spark/examples/jars/spark-examples.jar"
-  sparkConf:
-    spark.executor.instances: "1"
-    spark.kubernetes.container.image: "apache/spark:{{SPARK_VERSION}}"
-    spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
-  runtimeVersions:
-    sparkVersion: "4.2.0"
diff --git a/tests/e2e/kueue/chainsaw-test.yaml 
b/tests/e2e/kueue/chainsaw-test.yaml
index ca1dcac9..acccfc9d 100644
--- a/tests/e2e/kueue/chainsaw-test.yaml
+++ b/tests/e2e/kueue/chainsaw-test.yaml
@@ -24,8 +24,16 @@ spec:
   steps:
   - name: spark-application-without-queue-name-is-not-queued
     try:
+    # `KueueWorkloadFactory` rejects dynamic allocation, so an example using 
it could never
+    # produce a Workload, and the Workload check below would always pass. A 
single static
+    # executor keeps this eligible and fits next to the Kueue controller on 
the test node.
     - apply:
-        file: spark-example.yaml
+        bindings:
+          - name: SPARK_APP_NAMESPACE
+            value: default
+          - name: SPARK_APPLICATION_NAME
+            value: spark-job-kueue-test
+        file: "../fixtures/spark-application/spark-example.yaml"
     - assert:
         bindings:
           - name: SPARK_APP_NAMESPACE
diff --git a/tests/e2e/kueue/spark-example.yaml 
b/tests/e2e/kueue/spark-example.yaml
deleted file mode 100644
index e3a02d5d..00000000
--- a/tests/e2e/kueue/spark-example.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# `KueueWorkloadFactory` rejects dynamic allocation, so an example using it 
could never
-# produce a Workload and would keep the assertion inert. A single static 
executor keeps
-# this eligible and fits next to the Kueue controller on the test node.
-apiVersion: spark.apache.org/v1
-kind: SparkApplication
-metadata:
-  name: spark-job-kueue-test
-  namespace: default
-spec:
-  mainClass: "org.apache.spark.examples.SparkPi"
-  jars: "local:///opt/spark/examples/jars/spark-examples.jar"
-  sparkConf:
-    spark.executor.instances: "1"
-    spark.kubernetes.container.image: "apache/spark:{{SPARK_VERSION}}-scala"
-    spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
-  runtimeVersions:
-    sparkVersion: "4.2.0"
diff --git a/tests/e2e/state-transition/chainsaw-test.yaml 
b/tests/e2e/state-transition/chainsaw-test.yaml
index 23e1b184..efbcfccf 100644
--- a/tests/e2e/state-transition/chainsaw-test.yaml
+++ b/tests/e2e/state-transition/chainsaw-test.yaml
@@ -25,7 +25,7 @@ spec:
       - name: TEST_NAME
         value: succeeded
       - name: APPLICATION_FILE_NAME
-        value: ../fixtures/spark-application/spark-application-succeeded.yaml
+        value: ../fixtures/spark-application/spark-example.yaml
       - name: CLUSTER_FILE_NAME
         value: ../fixtures/spark-cluster/spark-cluster-example.yaml
       - name: SPARK_APPLICATION_NAME


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to