amoghrajesh commented on code in PR #77015:
URL: https://github.com/apache/airflow/pull/77015#discussion_r4704867434
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -1582,6 +1597,26 @@ def is_job_active(self, status: str) -> bool:
def is_job_succeeded(self, status: str) -> bool:
return is_run_succeeded(status)
+ def resume_failed_job(self, external_id: JsonValue, status: str, context:
Context) -> JsonValue | None:
+ # cancel_previous_runs keeps only the newest run going; reviving this
one would break that.
+ if status == RUN_NOT_FOUND_STATUS or self.cancel_previous_runs:
+ return None
+ run_id = cast("int", external_id)
+ self._merged_json = self._build_run_now_payload(context)
+ if self.databricks_repair_reason_new_settings:
+ run_state = self._hook.get_run_state(run_id)
+ if not is_repair_reason_match_exist(self, run_state):
+ return None
+ update_job_for_repair(self, self._hook,
self._merged_json["job_id"], run_state)
+ repair_json: dict[str, Any] = {"run_id": run_id,
"rerun_all_failed_tasks": True}
+ latest_repair_id = self._hook.get_latest_repair_id(run_id)
+ if latest_repair_id is not None:
+ repair_json["latest_repair_id"] = latest_repair_id
+ if "job_parameters" in self._merged_json:
+ repair_json["job_parameters"] = self._merged_json["job_parameters"]
+ self._hook.repair_run(repair_json)
Review Comment:
Handled in [pre merge comments from
kaxil](https://github.com/apache/airflow/pull/77015/commits/fd75f9529c2b8d4c81d0573f9d80ab7396dc594e)
##########
task-sdk/src/airflow/sdk/bases/resumablejobmixin.py:
##########
@@ -55,8 +57,9 @@ class ResumeDecision(NamedTuple):
previous job that ended without success, or ``None`` when there is none.
Review Comment:
Handled in [pre merge comments from
kaxil](https://github.com/apache/airflow/pull/77015/commits/fd75f9529c2b8d4c81d0573f9d80ab7396dc594e)
##########
providers/databricks/docs/changelog.rst:
##########
@@ -26,6 +26,13 @@
Changelog
---------
+.. note::
+
+ On Airflow 3.5 and later, a durable ``DatabricksRunNowOperator`` with
``deferrable=False`` that
+ retries after its stored run failed now repairs that run, rerunning only
the failed tasks, instead of
Review Comment:
Handled in [pre merge comments from
kaxil](https://github.com/apache/airflow/pull/77015/commits/fd75f9529c2b8d4c81d0573f9d80ab7396dc594e)
--
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]