amoghrajesh commented on code in PR #70183:
URL: https://github.com/apache/airflow/pull/70183#discussion_r3629467234


##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -933,16 +933,18 @@ def _start_yarn_application_status_tracking(self, 
application_id: str) -> None:
             elif poll_count % heartbeat_interval == 0:
                 self.log.info("YARN application %s is still %s", 
application_id, state)
 
+            diagnostics_suffix = f"\nDiagnostics: {diagnostics}" if 
diagnostics else ""
             if state in self._YARN_FINAL_FAILURES:
                 raise RuntimeError(
                     f"YARN application {application_id} ended with state: 
{state}, "
-                    f"final status: {final_status}"
+                    f"final status: {final_status}{diagnostics_suffix}"
                 )
             if final_status == self._YARN_FINAL_SUCCESS:
                 return
             if final_status in self._YARN_FINAL_FAILURES:
                 raise RuntimeError(
                     f"YARN application {application_id} ended with final 
status: {final_status}"
+                    f"{diagnostics_suffix}"
                 )
             if final_status != self._YARN_FINAL_UNDEFINED:

Review Comment:
   Not intentional, added {diagnostics_suffix} there too, plus a dedicated 
test. Agreed it's the branch where diagnostics helps most since the status 
itself is already unrecognized.



-- 
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]

Reply via email to