The GitHub Actions job "Tests" on airflow.git/tqt-callbacks-2-11 has succeeded. Run started by GitHub user potiuk (triggered by potiuk).
Head commit for run: abcedd7561cb5032e6e5338dfd3d10926406873f / Karen Braganza <[email protected]> Fix stuck queued tasks by calling executor fail method and invoking failure callbacks This commit addresses the handling of tasks that remain stuck in the queued state beyond the configured retry threshold. Previously, these tasks were marked as failed in the database but the executor was not properly notified, leading to inconsistent state between Airflow and the executor. Changes made: - Modified _maybe_requeue_stuck_ti() to accept executor parameter and call executor.fail() when tasks exceed requeue attempts, ensuring the executor is notified of task failures - Added logic to retrieve the DAG and task object to check for on_failure_callback - When a failure callback exists, create a TaskCallbackRequest and send it via executor to ensure failure callbacks are invoked for stuck queued tasks - Updated tests to verify that executor.fail() is called and callbacks are sent appropriately - Added test fixtures with mock_failure_callback to validate callback invocation - Changed pyproject.toml Python version requirement (unrelated) Why this matters: Tasks stuck in queued state can now be properly cleaned up at both the Airflow scheduler and executor levels, preventing resource leaks and ensuring failure callbacks are executed for proper error handling and alerting. Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Report URL: https://github.com/apache/airflow/actions/runs/21989402561 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
