Skip to content

Commit

Permalink
[FIX] Fixed databricks repair run deferrable (apache#44213)
Browse files Browse the repository at this point in the history
* [FIX] Fixed databricks repair run deferrable

* Removed trailing spaces as per pre-commit hook

* [Fix] Modified code to handle invalid trigger event
  • Loading branch information
raghvendra-singh1 authored Dec 11, 2024
1 parent e8e4c91 commit 419d8c6
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -930,13 +930,15 @@ def execute(self, context: Context):

def execute_complete(self, context: Context, event: dict[str, Any] | None = None) -> None:
if event:
if event.get("run_state"):
run_state = RunState.from_json(event["run_state"])
if event.get("repair_run"):
event["repair_run"] = event["repair_run"] and (
not self.databricks_repair_reason_new_settings
or is_repair_reason_match_exist(self, run_state)
)
_handle_deferrable_databricks_operator_completion(event, self.log)
run_state = RunState.from_json(event["run_state"])
should_repair = event["repair_run"] and (
not self.databricks_repair_reason_new_settings
or is_repair_reason_match_exist(self, run_state)
)
if should_repair:
if event.get("repair_run"):
self.repair_run = False
self.run_id = event["run_id"]
job_id = self._hook.get_job_id(self.run_id)
Expand Down

0 comments on commit 419d8c6

Please sign in to comment.