Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,10 @@ def test_yarn_raises_if_wait_app_completion_true(self):
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):
Expand Down