Skip to content

Eager-load DagCode in the Dag source API - #73752

Merged
jason810496 merged 1 commit into
apache:mainfrom
astronomer:eager-load-dagcode-in-dag-source
Sep 26, 2026
Merged

jason810496 merged 1 commit into
apache:mainfrom
astronomer:eager-load-dagcode-in-dag-source

Conversation

@uranusjr

Copy link
Copy Markdown
Member

GET /dags/{dag_id}/dagSources loaded the DagVersion first and then read the lazy dag_code relationship, issuing a second query.

Add a load_dag_code option that joinedloads dag_code, and use it from the Dag source route so the source and its language come back in a single query.

Close #73716.

GET /dags/{dag_id}/dagSources loaded the DagVersion first and then read
the lazy dag_code relationship, issuing a second query. Add a
load_dag_code option to DagVersion.get_version that joinedloads dag_code,
and use it from the Dag source route so the source and its language come
back in a single query.

Closes: apache#73716
Signed-off-by: Tzu-ping Chung <tp@astronomer.io>

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, same as what I imagined for the follow-up, thanks.

@jason810496
jason810496 merged commit 1219b1a into apache:main Sep 26, 2026
159 of 160 checks passed
@jason810496
jason810496 deleted the eager-load-dagcode-in-dag-source branch September 26, 2026 15:37
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

Development

Successfully merging this pull request may close these issues.

Eager-load DagCode in the Dag source API

3 participants