Sathvik-Chowdary-Veerapaneni commented on PR #63692: URL: https://github.com/apache/airflow/pull/63692#issuecomment-4686704375
@ephraimbuddy Thanks for the review — fair questions, here's both answers. Reproduced with the reporter's DAG from #63374: real scheduler + dag processor, task fails → DagRun fails → callback fires with `reason=task_failure`. On the `SQLAlchemyError` question: the `except` doesn't swallow the error — it routes into the existing reload-from-DB recovery path (from #59857), which previously only triggered on `DetachedInstanceError`. A broken session can also raise e.g. `PendingRollbackError` or `InvalidRequestError` on the same lazy-load; those escaped the narrow catch, so the context build raised and the callback request was never produced. The latest commits also harden the recovery: PK is read from the instance identity (reading `.id` on an expired instance re-triggers the broken session), and if the reload can't recover, the original exception re-raises to the scheduler. Added `test_dagrun_context_consumed_asset_events_with_invalidated_transaction`: poisons a session so lazy-loading raises `PendingRollbackError` and asserts the context is still built. -- 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]
