You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/09/24 16:55:13 UTC
(spark-kubernetes-operator) branch main updated: [SPARK-59767] Consolidate `Kueue` integration tests into the `kueue` E2E test
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 36ba348f [SPARK-59767] Consolidate `Kueue` integration tests into the `kueue` E2E test
36ba348f is described below
commit 36ba348f41aabe8962e2102b69d357ed4c34f682
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Thu Sep 24 09:55:06 2026 -0700
[SPARK-59767] Consolidate `Kueue` integration tests into the `kueue` E2E test
### What changes were proposed in this pull request?
This PR aims to consolidate the `Kueue` integration tests into the `kueue` mode of the `K8s Integration Tests` job.
- Run `helm test spark` after installing the operator in the `kueue` mode, so that `test-rbac.yaml` asserts the opt-in Kueue RBAC rules there.
- Move the check that Kueue RBAC is denied by default from `Helm Tests` to the `kueue` mode. It runs after the `chainsaw` test.
- Remove the `kueue` group and the `Install Kueue` step from the `Helm Tests` job.
- Remove `tests/e2e/helm/helm-test-values/kueue/values.yaml` because `tests/e2e/helm/kueue-config-values.yaml` already sets `operatorRbac.kueue.enabled: true`.
### Why are the changes needed?
Currently, the Kueue integration tests are split into two jobs that use the same K8s and Kueue versions.
| Job | Kueue Test |
| - | - |
| `K8s Integration Tests` (`kueue` mode) | `tests/e2e/kueue` Chainsaw test |
| `Helm Tests` (`kueue` group) | Kueue RBAC check with `helm test` and the default denial check |
Only the `kueue` group of `Helm Tests` needs Kueue, but the whole `Helm Tests` job installs it and waits for it. After this PR, only one job downloads and installs Kueue, and all Kueue tests run in the same place.
### Does this PR introduce _any_ user-facing change?
No. This is a test-only change.
### 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 #882 from dongjoon-hyun/SPARK-59767.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.github/workflows/build_and_test.yml | 23 ++++++++-------------
tests/e2e/helm/helm-test-values/kueue/values.yaml | 25 -----------------------
2 files changed, 8 insertions(+), 40 deletions(-)
diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml
index 55187b49..176289dc 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -265,10 +265,17 @@ jobs:
build-tools/helm/spark-kubernetes-operator/values.yaml -f \
tests/e2e/helm/kueue-config-values.yaml \
build-tools/helm/spark-kubernetes-operator/
+ helm test spark
- name: Run E2E Test with Kueue Enabled
if: matrix.mode == 'kueue'
run: |
chainsaw test --test-dir ./tests/e2e/${{ matrix.test-group }} --parallel 1
+ # Verify Kueue RBAC is denied by default. The same impersonated check must answer
+ # "yes" first, otherwise a wrong subject would make the denial below vacuous.
+ kubectl auth can-i create workloads.kueue.x-k8s.io --as=system:serviceaccount:default:spark-operator
+ helm upgrade spark -f build-tools/helm/spark-kubernetes-operator/values.yaml \
+ build-tools/helm/spark-kubernetes-operator/
+ if kubectl auth can-i create workloads.kueue.x-k8s.io --as=system:serviceaccount:default:spark-operator; then exit 1; fi
helm-tests:
name: "Helm Tests"
needs: build-image
@@ -300,29 +307,15 @@ jobs:
run: |
kubectl get pods -A
kubectl describe node
- - name: Install Kueue
- run: |
- kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/${{ env.KUEUE_VERSION }}/manifests.yaml
- # Kueue installs webhooks for pods, deployments and statefulsets with failurePolicy=Fail,
- # so wait for the controller (whose readyz covers the webhook server) before helm install.
- kubectl wait deploy/kueue-controller-manager -n kueue-system --for=condition=Available --timeout=5m
- name: Run Spark K8s Operator Helm Tests
run: |
- for group in configmap-metadata kueue network-policy operator-command; do
+ for group in configmap-metadata network-policy operator-command; do
echo "::group::Helm Tests: $group"
helm install spark --create-namespace -f \
build-tools/helm/spark-kubernetes-operator/values.yaml -f \
tests/e2e/helm/helm-test-values/$group/values.yaml \
build-tools/helm/spark-kubernetes-operator/
helm test spark
- if [ "$group" = "kueue" ]; then
- # Verify Kueue RBAC is denied by default. The same impersonated check must answer
- # "yes" first, otherwise a wrong subject would make the denial below vacuous.
- kubectl auth can-i create workloads.kueue.x-k8s.io --as=system:serviceaccount:default:spark-operator
- helm upgrade spark -f build-tools/helm/spark-kubernetes-operator/values.yaml \
- build-tools/helm/spark-kubernetes-operator/
- if kubectl auth can-i create workloads.kueue.x-k8s.io --as=system:serviceaccount:default:spark-operator; then exit 1; fi
- fi
helm uninstall spark --wait
# Uninstall deletes the operator pod in the background, so wait until it is gone
# before the next group's tests select the operator pod by its labels.
diff --git a/tests/e2e/helm/helm-test-values/kueue/values.yaml b/tests/e2e/helm/helm-test-values/kueue/values.yaml
deleted file mode 100644
index 23ab0721..00000000
--- a/tests/e2e/helm/helm-test-values/kueue/values.yaml
+++ /dev/null
@@ -1,25 +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.
-
-# Test values for validating the opt-in Kueue RBAC rules. The Kueue CRDs must be installed
-# on the cluster for the `helm test` assertions to run.
-#
-# Usage:
-# helm install spark-operator . -f tests/e2e/helm/helm-test-values/kueue/values.yaml
-# helm test spark-operator
-
-operatorRbac:
- kueue:
- enabled: true
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org