Skip to content

Conversation

@antonlin1
Copy link
Contributor

For dag that is timed out, with only skipped tasks, following error is thrown

Failed to emit OpenLineage DAG failed event: 
 Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/adapter.py", line 505, in dag_failed
    **get_airflow_state_run_facet(dag_id, run_id, task_ids, dag_run_state),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/utils/utils.py", line 746, in get_airflow_state_run_facet
    else (ti.end_date - ti.start_date).total_seconds()
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'

This PR fixes said issue

@antonlin1 antonlin1 force-pushed the antonlin/fix_ol_event_on_timeout branch from 243d853 to 489c75c Compare October 10, 2025 10:35
@antonlin1
Copy link
Contributor Author

antonlin1 commented Oct 10, 2025

/merge lol this is not datadog

@mobuchowski mobuchowski merged commit 1951f9b into apache:main Oct 10, 2025
80 checks passed
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
dabla pushed a commit to dabla/airflow that referenced this pull request Oct 12, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
* fix openlineage dag state event emit on dag with skipped tasks

* fix tests

* rid of else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants