amoghrajesh commented on code in PR #77015:
URL: https://github.com/apache/airflow/pull/77015#discussion_r4715705672
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/durable_execution.py:
##########
@@ -57,8 +60,16 @@ def get_durable_execution(scope: TaskScopeDep, session:
SessionDep) -> DurableEx
)
if value is None:
return DurableExecutionResponse(tries=[])
- try:
- return DurableExecutionResponse.model_validate(json.loads(value))
- except ValidationError:
- # With [workers] state_store_backend set, the row holds only a
reference to the offloaded value.
+ record = json.loads(value)
+ # With [workers] state_store_backend set, the row holds only a reference
to the offloaded value.
Review Comment:
Applied.
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -1582,6 +1597,28 @@ 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:
Review Comment:
A retry now repairs only `TERMINATED` or `INTERNAL_ERROR` runs whose result
state is `FAILED`, `TIMEDOUT` or `CANCELED`, which matches Databricks' "repair
failed or canceled runs". A user cancel shows up as `TERMINATED:CANCELED`.
Every other state, such as `SKIPPED`, `MAXIMUM_CONCURRENT_RUNS_REACHED`,
`EXCLUDED`, `UPSTREAM_*` and `NOT_FOUND:`, gets a fresh run. A parametrized
test pins both lists, and the docstring, `run_now.rst` and the changelog say
the same. Note: the real Databricks failure in the PR's end to end test came
back as `INTERNAL_ERROR:FAILED`, so that one stays repairable.
--
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]