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
Add option to clear only failed tasks in a graph view #38217
Conversation
Nit: I have added "clear only failed tasks" but can make it "clear failed tasks" as per original issue since when the failed task is cleared the downstream tasks that have upstream_failed state are also cleared. |
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.
Nice Feature. LGTM.
failed tasks are just |
This is the equivalent of "Clear task" with the parameters upstream+downstream+only_failed set to true, right? |
@eladkal I overlooked this part in the original issue. First I thought passing failed only clears failed tasks but it also cleared upstream failed. I found it useful since after the failed tasks is cleared and it succeeds having the downstream task might result in an extra action if not for the behaviour. Then I found the code as below where the logic is present. The request was also for dags with large number of tasks where downstream=True requirement means this will only clear upstream_failed downstream tasks and not success downstream tasks. Adding downstream or not option will change this into a modal similar to the clear task button on a dagrun level. @Pad71 let me know if I missed something. Lines 2333 to 2334 in 3840ec6
|
Yes, as per my understanding of the code. |
@tirkarthi Yeah, the requirement is - clear all failed tasks in selected dag run and clear their downstream tasks in upstream_failed state. |
Thanks @Pad71 , the PR implements the requirement. |
Thank you @tirkarthi and all involved! Good job. if you guys have a time to check this discussion, it would be great. |
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.
Looks good, LGTM!
This PR adds a new option to clear only failed tasks in a dag run. The backend API will accept a new parameter only_failed which by default is False for backwards compatibility.
closes: #38031
related: #38031