Skip to content

DebugExecutor runs task callbacks twice #24957

@jochenott

Description

@jochenott

Apache Airflow version

2.3.3 (latest released)

What happened

The DebugExecutor runs the on_failure_callback twice.

This is due to TaskInstance._run_finished_callback() being called twice: once implicitly via the (new) call to ti.run(), once explicitly again:

https://github.com/apache/airflow/blob/62778bb8648515e9823ace2f48d9a89ec91a6803/airflow/executors/debug_executor.py#L79,L81

This came in to the airflow 2-3 branch via this commit: 13e4a75

This is not an issue on the main branch, where the explicit call to TaskInstance._run_finished_callback() has been removed from the DebugExecutor.

What you think should happen instead

No response

How to reproduce

No response

Operating System

Debian 11

Versions of Apache Airflow Providers

No response

Deployment

Other

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions