Repository navigation
Keep the Dag asset schedule the same shape for every caller - #73805
Merged
henry3260 merged 1 commit intoOct 5, 2026
Merged
Conversation
pierrejeambrun
approved these changes
Oct 5, 2026
next_run_assets returns only the assets the caller may read, so a UI deriving the schedule from that list renders a different Dag depending on who is looking at it: a smaller total, the single-asset layout instead of the popover, or no asset schedule at all when none of the assets are readable.
henry3260
force-pushed
the
fix-asset-schedule-count-caller-scoped
branch
from
October 5, 2026 16:17
ed1bc99 to
b4e6468
Compare
henry3260
marked this pull request as ready for review
October 5, 2026 17:28
henry3260
requested review from
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
jason810496,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 5, 2026 17:28
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.
closes: #73803
Stacked on #72862 — that PR's commit is included in this branch's diff; only the second commit belongs to this change.
Why
#72862 scopes
GET /ui/next_run_assets/{dag_id}soeventscarries only the assets the caller may read, whileasset_expressionkeeps a hidden slot for each unreadable one (#72864).AssetSchedule.tsxstill derives both the total and its layout fromevents, so the Dag renders differently depending on who is looking at it.For a Dag scheduled on assets A, B and C, a caller who may read only A sees:
scheduledTotalisnextRunEvents.length.nextRunEvents.length === 1branch.!nextRunEvents.lengthbranch falls back totimetableSummary, hiding that the Dag is asset triggered.The popover contents are already correct:
AssetExpressionrenders the hidden slots.What
NextRunAssetsResponsegainsscheduling_asset_count: how many assets the Dag is scheduled on, counted before the readable filter narrows the query. It reveals nothing new — the redacted expression already carries one slot per asset.AssetSchedule.tsxuses it forscheduledTotaland for the two length-based branches.scheduledCountis unchanged: only readable, satisfied assets count as ready.The count costs one extra query on an endpoint that renders once per Dag card, so
assert_queries_countgoes from 5 to 6. An alternative that avoids it — filtering unreadable rows in Python instead of SQL, taking the total from the unfiltered row count — would mean reworking #72862's approach; happy to switch if reviewers prefer that trade.Was generative AI tooling used to co-author this PR?