You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "gaurav7261 (via GitHub)" <gi...@apache.org> on 2024/04/25 16:52:06 UTC
Re: [PR] [FEAT] raise exception with main notebook error in DatabricksRunNowDeferrableOperator [airflow]
gaurav7261 commented on code in PR #39110:
URL: https://github.com/apache/airflow/pull/39110#discussion_r1579828957
##########
airflow/providers/databricks/triggers/databricks.py:
##########
@@ -84,13 +84,30 @@ async def run(self):
async with self.hook:
while True:
run_state = await self.hook.a_get_run_state(self.run_id)
+ notebook_error = None
if run_state.is_terminal:
+ if run_state.result_state == "FAILED":
+ run_info = await self.hook.a_get_run(self.run_id)
+ task_run_id = None
+ if "tasks" in run_info:
+ for task in run_info["tasks"]:
+ if task.get("state", {}).get("result_state", "") == "FAILED":
+ task_run_id = task["run_id"]
Review Comment:
done @pankajkoti , please review, did same refactoring in run now operator as well
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org