This is an automated email from the ASF dual-hosted git repository.
Miretpl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2731cc29e4c Spark: Fix missing space in YARN waitAppCompletion error
message (#71055)
2731cc29e4c is described below
commit 2731cc29e4c3bfbaed8acc053b778487a8851e2f
Author: Arnav <[email protected]>
AuthorDate: Wed Aug 5 02:09:11 2026 +0530
Spark: Fix missing space in YARN waitAppCompletion error message (#71055)
Fix implicit string literal concatenation missing a space between
'conflicts' and 'with' in _YarnSparkSubmitBackend.
---
.../src/airflow/providers/apache/spark/operators/spark_submit.py | 2 +-
.../spark/tests/unit/apache/spark/operators/test_spark_submit.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
a/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py
b/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py
index 096f9ca84fc..d70729cb27f 100644
---
a/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py
+++
b/providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py
@@ -152,7 +152,7 @@ class
_YarnSparkSubmitBackend(_SparkSubmitDeploymentBackend):
def submit_job(self, context: Context) -> str | None:
if self.hook._conf.get("spark.yarn.submit.waitAppCompletion",
"").strip().lower() == "true":
raise ValueError(
- "spark.yarn.submit.waitAppCompletion=true cannot be set for
cluster mode as it conflicts"
+ "spark.yarn.submit.waitAppCompletion=true cannot be set for
cluster mode as it conflicts "
"with the need to exit spark-submit immediately to persist the
application ID for tracking. "
"Either remove the explicit conf or set durable=False."
)
diff --git
a/providers/apache/spark/tests/unit/apache/spark/operators/test_spark_submit.py
b/providers/apache/spark/tests/unit/apache/spark/operators/test_spark_submit.py
index 18a3928e791..953af3408d0 100644
---
a/providers/apache/spark/tests/unit/apache/spark/operators/test_spark_submit.py
+++
b/providers/apache/spark/tests/unit/apache/spark/operators/test_spark_submit.py
@@ -819,7 +819,10 @@ class TestSparkSubmitOperatorResumable:
hook._conf = {"spark.yarn.submit.waitAppCompletion": "true"}
operator._hook = hook
- with pytest.raises(ValueError, match="waitAppCompletion=true"):
+ with pytest.raises(
+ ValueError,
+ match=r"spark\.yarn\.submit\.waitAppCompletion=true cannot be set
for cluster mode as it conflicts with the need",
+ ):
operator.submit_job(context={})
def test_yarn_poll_tolerates_transient_resourcemanager_failures(self):