airflow: Add possibility to LineageBackend to be notified of task instance execution start and failure
Description
Provide way for LineageBackend
to be notified of task instance start and failed execution.
Proposed implementation:
- add start and fail methods to LineageBackend
- prepare_lineage decorator should call LineageBackend’s start method the same way that apply_lineage calls send_lineage.
- call fail method on where on_failure_callback is called.
Use case/motivation
I’m working on OpenLineage integration for Airflow 2. I’ve created MVP of this.
In contrast to our integration for Airflow 1.10 done via subclassing DAG, LineageBackend
provides easy way to integrate OpenLineage just via configuration.
However, LineageBackend.send_lineage
is called just on successful task execution, while we also want to track newly started and failed tasks.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 27 (26 by maintainers)
Not yet. Life took over. But I will