Repository navigation
[v3-3-test] Reduce per-task DB round trips in the asset dependency graph API (#71915) - #72737
Closed
vatsrahul1001 wants to merge 1 commit into
Closed
vatsrahul1001 wants to merge 1 commit into
vatsrahul1001 wants to merge 1 commit into
Conversation
) Adapted from #71915 to v3-3-test's dependency-graph BFS (its function predates the #69833 refactor, so the original diff does not cherry-pick). Same optimization: collect all producing/consuming task keys for the current asset and resolve the inlet/outlet references in a single batched tuple_().in_() query instead of one query per task. Behaviour is unchanged; the 26 dependency tests pass.
vatsrahul1001
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
September 8, 2026 18:46
pierrejeambrun
left a comment
Member
There was a problem hiding this comment.
This depends heavily on a rewrite that wasn't backported.
I would mark this for 3.4 too.
Contributor
Author
|
Closing backport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #71915 to
v3-3-testfor the Airflow 3.3.2 patch release.This is an adaptation, not a straight cherry-pick. #71915 was written on top of #69833 ("Consolidate UI Dependency Graphs", a 29-file refactor that is not backported), so its diff doesn't apply to v3-3-test's older dependency-graph function. v3-3-test has the same N+1 pattern (a
TaskInletAssetReference/TaskOutletAssetReferencequery per task, inside the producing/consuming loops), so I applied the same optimization to it: collect the task keys for the current asset and resolve inlets/outlets in a single batchedtuple_(...).in_(...)query.Behaviour is unchanged — all 26 tests in
test_dependencies.pypass locally.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines