Skip to content

Conversation

@github-actions
Copy link

Previously it was missing dag_id filter, but joining on start date would still be problematic. In this PR I refactor the query a bit so that all joins are guaranteed 1-1. To get "latest" DagRun I sort by the DagRun.id column. This is a simplifying assumption that would be more performant than sorting by start_date, since there could be more than 1 dag run with a given start date.
(cherry picked from commit b994bb2)

Co-authored-by: Daniel Standish 15932138+dstandish@users.noreply.github.com

Previously it was missing dag_id filter, but joining on start date would still be problematic. In this PR I refactor the query a bit so that all joins are guaranteed 1-1.  To get "latest" DagRun I sort by the DagRun.id column.  This is a simplifying assumption that would be more performant than sorting by start_date, since there could be more than 1 dag run with a given start date.
(cherry picked from commit b994bb2)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label May 28, 2025
@dstandish dstandish marked this pull request as ready for review May 28, 2025 18:00
@dstandish dstandish merged commit 8969367 into v3-0-test May 28, 2025
68 checks passed
@dstandish dstandish deleted the backport-b994bb2-v3-0-test branch May 28, 2025 19:51
kaxil pushed a commit that referenced this pull request Jun 3, 2025
…51172)

Previously it was missing dag_id filter, but joining on start date would still be problematic. In this PR I refactor the query a bit so that all joins are guaranteed 1-1.  To get "latest" DagRun I sort by the DagRun.id column.  This is a simplifying assumption that would be more performant than sorting by start_date, since there could be more than 1 dag run with a given start date.
(cherry picked from commit b994bb2)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant