dongjoon-hyun opened a new pull request, #934: URL: https://github.com/apache/spark-kubernetes-operator/pull/934
### What changes were proposed in this pull request? This PR aims to fix the `podLogs` collectors in the `catch` blocks of the E2E tests. - Select Spark application pods by `spark.operator/spark-app-name=<SparkApplication name>`, which the operator adds to both the driver and executor pods. - Set `tail: -1` to collect all log lines. ### Why are the changes needed? When a test fails, most of the Spark and operator logs are missing from the diagnostic output. - `spark-app-name` comes from `spark.app.name`, not the `SparkApplication` name. In these tests, it is `spark` for the driver pod and an application-defined name like `spark-pi` for the executor pods. So, `spark-app-name=<SparkApplication name>` (`pi-java25`, `pi-with-comet`, `pi-with-gluten`) matches no pod, and `spark-app-name=spark` (`python`, `spark-versions`) matches only the driver pod. - `kubectl logs` with a selector returns only the last 10 lines per container unless `--tail` is given. This has been hidden because `kubectl logs` exits with 0 when no pod matches, and the `catch` blocks run only on failures. ### Does this PR introduce _any_ user-facing change? No. This is a test-only change. ### How was this patch tested? Pass the CIs. Since the CIs don't run the `catch` blocks unless the tests fail, the following were checked manually. - On a local K8s cluster, the new selectors match the driver and executor pods of `pi-java25` and `pi-with-comet`, while the old ones match no pod. - With `chainsaw test --no-cluster`, the selector expressions of `python` and `spark-versions` evaluate to their `SparkApplication` names. - `kubectl logs` with a selector returns all lines with `--tail -1`, and only 10 lines without it. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 -- 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]
