amoghrajesh commented on code in PR #72100:
URL: https://github.com/apache/airflow/pull/72100#discussion_r4013087902
##########
airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:
##########
@@ -73,20 +89,27 @@ def _clear_task_state_store_on_success(tis: Sequence[TI],
session: Session) -> N
)
try:
backend.clear(scope=scope, session=session)
- log.info(
- "Cleared task state on success",
- dag_id=ti.dag_id,
- run_id=ti.run_id,
- task_id=ti.task_id,
- map_index=ti.map_index,
- )
+ discarded_count += 1
except Exception:
log.warning(
- "Failed to clear task state on success",
+ "Failed to discard task state",
+ discard_event=event,
dag_id=ti.dag_id,
run_id=ti.run_id,
task_id=ti.task_id,
+ map_index=ti.map_index,
+ exc_info=True,
)
+ break
Review Comment:
Fixed. Split back into two functions.`_clear_task_state_store_on_success` is
restored to its exact original continue on error, per entity logged behavior.
The clear route function is untouched (still stops on first failure).
--
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]