-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Only return non-None task summaries for grid view #23924
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -258,7 +258,11 @@ def task_group_to_grid(task_item_or_group, dag, dag_runs, session): | |||||||||||||||||||
| if isinstance(task_item_or_group, AbstractOperator): | ||||||||||||||||||||
| return { | ||||||||||||||||||||
| 'id': task_item_or_group.task_id, | ||||||||||||||||||||
| 'instances': [wwwutils.get_task_summary(dr, task_item_or_group, session) for dr in dag_runs], | ||||||||||||||||||||
| 'instances': [ | ||||||||||||||||||||
| ts | ||||||||||||||||||||
| for ts in [wwwutils.get_task_summary(dr, task_item_or_group, session) for dr in dag_runs] | ||||||||||||||||||||
| if ts is not None | ||||||||||||||||||||
| ], | ||||||||||||||||||||
|
Comment on lines
+261
to
+265
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to throw out another option,
Suggested change
don't know if it also needs to be wrapped with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW if we don’t need to care about empty summary (or if we’re OK to also filter those out), we can simply do filter(None, (...))But yes I believe an additional
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice, i was thinking there must be a shorthand of some kind for this
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternative fix here: #23932 - I think we shoudl slowly start add typing also to views.py as this precisely the kind of errors that would have been prevented if we had typing here in the first place.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More type checking is always nice. I've been meaning to add typescript to the UI.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh yeah. Absolutely. Typescript is soooo much better than plain javascript. One thing that it makes easier - is for anyone to contribute more fixes in an easy way. (once we have a built-in automation to transpile it, which is super-easy with yarn etc). I think lack of typing support, autocomplete and verification makes it really difficult for "newcomers" to reason about their changes and it's so much easier to contribute small fixes there. You somehow loose that when you get familiar, when you put yourselve in the shoes of new contributor - it's a world of difference. |
||||||||||||||||||||
| 'label': task_item_or_group.label, | ||||||||||||||||||||
| 'extra_links': task_item_or_group.extra_links, | ||||||||||||||||||||
| 'is_mapped': task_item_or_group.is_mapped, | ||||||||||||||||||||
|
|
||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.