-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Hide "deferred chip" on Dashboard unless pool is set to count deferred #55857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
airflow-core/src/airflow/ui/src/pages/Dashboard/PoolSummary/PoolSummary.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the related issue #53826.
As mentionned in there, I think there 'scheduled' is also causing troubles, unless it was fixed in the meantime. Hidding deferred slots count is removing an information, the linked issue suggest how we could still display it, without impacting the pool slot count. Any other UI suggestion on how to still display that information is welcomed. We probably shouldn't just remove it.
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to mark as 'resolved' conversion you have addressed. Just so we can have a quick overview of the remaining work before it needs another round of review.
|
@pierrejeambrun I was thinking if we could show count of deferred, scheduled as small badges next to or below the bar that would keep the information transparent and wont affect even if we choose to include deferred or not. Whats your opinion on this? |
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierrejeambrun I was thinking if we could show count of deferred, scheduled as small badges next to or below the bar that would keep the information transparent and wont affect even if we choose to include deferred or not. Whats your opinion on this?
Yes, I like this. Show in the pool bar stuff that contributes to slots. (even deferred, if deffered option is checked), and show bellow in a small badge count of other states that do not contribute to pool slots. (scheduled, deferred depending on option value)
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
Raising a new PR for this. |
Let us know when you have a new PR ready and we can close this one. |
|
Closing in favor of #59270 |
Description
The Pool Slots bar was misleading when pools were configured with include_deferred = false.
Deferred tasks were always shown as a purple chip, making it look like “129 of 128 slots used” even though those tasks were not consuming slots.
This PR fixes the behaviour:
PoolBar.tsx: skip rendering the deferred_slots chip when include_deferred is false.
PoolSummary.tsx (Dashboard): aggregate deferred_slots only from pools with include_deferred = true.
Now, deferred tasks are only shown when they actively consume pool slots.
How to reproduce (before fix)
Create a pool with 128 slots.
Run a DAG with a deferrable task (DateTimeSensorAsync).
In Admin → Pools, toggle Include deferred tasks in occupied slots = OFF.
UI shows ✓ 128 + purple 1 → misleading, looks like 129/128 slots.
Same issue appears on Dashboard → Pool Summary bar.
After fix
With toggle OFF → only ✓ 128 is shown.
With toggle ON → ✓ 127 + purple 1 (correct, since deferred counts toward occupied).
Dashboard Pool Summary reflects the same rule (aggregates deferred only from pools that opted in).
Demo Video
Screen.Recording.2025-09-19.at.2.42.03.AM.mp4
Related Issue
closes: #55734