tests.system.openlineage.example_openlineage_task_states_dag

DAG with tasks whose events only taskInstance’s state tells apart (requires Airflow 3+).

It checks:
  • a task that skips itself emits START with state running, and COMPLETE with state skipped, which a successful task’s COMPLETE would carry as success (Airflow 3.0 calls no listener when a task skips itself, so it emits no COMPLETE there, and its lone START isn’t checked)

  • a task that raises AirflowFailException with retries left emits START with state running, and FAIL with state failed at try_number 1 and max_tries 2: it isn’t retried although try_number <= max_tries

  • taskInstance’s dag_version_id of every event, from Airflow 3.1 on

  • every task event’s identity, as system.openlineage.expected_events describes it, and each task in the Dag’s job facet

Attributes

DAG_ID

test_run

Functions

skip_itself()

Module Contents

tests.system.openlineage.example_openlineage_task_states_dag.DAG_ID = 'openlineage_task_states_dag'[source]
tests.system.openlineage.example_openlineage_task_states_dag.skip_itself()[source]
tests.system.openlineage.example_openlineage_task_states_dag.test_run[source]

Was this entry helpful?