Skip to content

Conversation

uranusjr
Copy link
Member

When rendering a dag in the API, we must take account for cases when a mapped task cannot be expanded, either due to the upstream has not been resolved, or cannot provide a value due to failure.

When this happens, we simply count 1 ti for the unexpanded task. This is how the scheduler represent the task internally, and should be a good enough value for UI representation.

Close #48786.

Copy link
Contributor

@phanikumv phanikumv left a comment

Choose a reason for hiding this comment

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

CI failures to be fixed

@tirkarthi
Copy link
Contributor

Test failures seem to be unrelated. Maybe update the branch with main to give it a try?

When rendering a dag in the API, we must take account for cases when a
mapped task cannot be expanded, either due to the upstream has not been
resolved, or cannot provide a value due to failure.

When this happens, we simply count 1 ti for the unexpanded task. This is
how the scheduler represent the task internally, and should be a good
enough value for UI representation.
@uranusjr uranusjr force-pushed the api-not-crash-for-unexpanded branch from ccbd65a to 4d6de80 Compare April 26, 2025 01:28
@uranusjr
Copy link
Member Author

Looks like the docker compose thing is failing everywhere. I’ll ignore it.

@uranusjr uranusjr merged commit 19122e7 into apache:main Apr 26, 2025
7 checks passed
@uranusjr uranusjr deleted the api-not-crash-for-unexpanded branch April 26, 2025 07:46
kaxil pushed a commit that referenced this pull request Apr 26, 2025
@kaxil kaxil added this to the Airflow 3.0.1 milestone Apr 26, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Great, thanks @uranusjr!

jroachgolf84 pushed a commit to jroachgolf84/airflow that referenced this pull request Apr 30, 2025
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.

Grid view stops loading when there is a pending task to be expanded
5 participants