dongjoon-hyun commented on code in PR #829: URL: https://github.com/apache/spark-kubernetes-operator/pull/829#discussion_r4027233506
########## tests/e2e/kueue/chainsaw-test.yaml: ########## @@ -0,0 +1,102 @@ +# +# 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: chainsaw.kyverno.io/v1alpha1 +kind: Test +metadata: + name: spark-operator-kueue +spec: + namespace: default + steps: + - name: spark-application-without-queue-name-is-not-queued + try: + - apply: + file: spark-example.yaml + - assert: + bindings: + - name: SPARK_APP_NAMESPACE + value: default + - name: SPARK_APPLICATION_NAME + value: spark-job-kueue-test + timeout: 10m + file: "../assertions/spark-application/spark-state-transition.yaml" + # No operator code path creates a Workload yet: `KueueWorkloadFactory` has no caller + # outside its own unit tests. This pins the opt-out behavior for when it is wired in. + - error: + timeout: 10s + resource: + apiVersion: kueue.x-k8s.io/v1beta2 + kind: Workload + metadata: + namespace: default + catch: Review Comment: Agreed, thanks. dd39c64 adds a pod `describe` and `podLogs` to both `catch:` blocks, selecting on `spark.operator/spark-app-name=spark-job-kueue-test` and `spark.operator/spark-cluster-name=qa`, so a `FailedScheduling` event like the one in 654c26d will show up. `chainsaw lint test` (v0.2.15, same as CI) reports the file as valid. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
