Skip to content

Airflow 3.0 not emitting OpenLineage Task Failure Events #46915

Closed

Description

@vandyliu

Apache Airflow Provider(s)

openlineage

Versions of Apache Airflow Providers

openlineage 2.0.0 (part of 3.0.0alpha)

Apache Airflow version

3.0.0alpha

Operating System

linux

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

I am testing airflow 3.0 and open lineage.

What you think should happen instead

No response

How to reproduce

I created an Airflow 3.0 instance and deployed this DAG. When I ran the DAG and looked at the emitted OL events, I did not see any task failure events. I did see the DAG start, task starts, and DAG failure event.

from datetime import datetime, timedelta
import random
import time
import logging
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.providers.common.compat.openlineage.facet import Dataset as OLDataset
from airflow.datasets import Dataset

ol_dataset = OLDataset(
    name="oldataset",
    namespace="olnamespace",
    facets={}
)

af_dataset = Dataset("afdataset")

# Define default args
default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 0,
    'retry_delay': timedelta(minutes=5),
}

def fail():
    raise ValueError("Task failed.")

# Define DAG
dag = DAG(
    'faildag',
    default_args=default_args,
    description='A DAG with complex task dependencies and logic.',
    start_date=datetime(2023, 12, 1),
    catchup=False,
    tags=['example'],
)

# Define tasks
airflow_dataset_fail = PythonOperator(
    task_id='airflow_dataset_fail',
    python_callable=fail,
    dag=dag,
    inlets=[af_dataset],
    outlets=[af_dataset]
)

ol_dataset_fail = PythonOperator(
    task_id='ol_dataset_fail',
    python_callable=fail,
    dag=dag,
    inlets=[ol_dataset],
    outlets=[ol_dataset]
)

[airflow_dataset_fail, ol_dataset_fail]

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Feb 20, 2025
  2. boring-cyborg commented on Feb 20, 2025

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. ashb commented on Feb 20, 2025

    @ashb
    Member

    Do you see anything that might give a clust in the task or stdout of celery/local exec logs, perhaps something like this #45423 (comment)

  4. removed
    needs-triage
    on Feb 20, 2025
  5. vikramkoka commented on Feb 20, 2025

    @vikramkoka
    Contributor

    @mobuchowski I am not sure if you were aware of this.
    Can you please take a look and comment on this?

  6. mobuchowski commented on Feb 20, 2025

    @mobuchowski
    Contributor

    This should fix that error - the dag runs (well, fails) normally for me now. #46941

  7. vikramkoka commented on Feb 21, 2025

    @vikramkoka
    Contributor

    This should fix that error - the dag runs (well, fails) normally for me now. #46941

    Thank you @mobuchowski !

  8. added this to the Airflow 3.0.0 milestone on Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:providerskind:bugprovider:openlineage

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions