dstaple opened a new issue, #31510: URL: https://github.com/apache/airflow/issues/31510
### Description When a failed task is deleted or cleared, any downstream tasks should be cleared from the "upstream_failed" state. This should not require users to manually select the "downstream" and "recursive" options, which are more invasive and will clear downstream tasks regardless of their state. In general, if a task is in the "upstream failed" state, it should actually have upstream tasks that are in the failed state. ### Use case/motivation When a user clears or deletes a failed task, downstream tasks can be left in the "upstream_failed" state. This happens any time a failed task is deleted via the Browse, Task Instances search feature. It also happens in the graph view if a failed task is cleared without downstream and recursive checked. The issue with the current behavior is if a previously failed tasks succeeds after being cleared, then any downstream tasks will be indefinitely orphaned in an inconsistent state where they say "upstream_failed", but actually, these tasks no longer have any upstream tasks that have failed. This behavior is also inconsistent with what happens when you manually mark a task as success in the graph view: In that scenario, all downstream tasks that were previously in the "upstream_failed" state are immediately cleared and will attempt to run as expected. Finally, the current behavior limits the usability of clearing tasks via the task search feature and makes it prone to user error. The behavior that occurs when tasks are manually marked as success makes more sense because it prevents tasks from being orphaned. Clearing a task and having it succeed should have the same behavior as manually marking a task as success: namely downstream tasks that are specifically in the upstream_failed state should be cleared. ### Related issues _No response_ ### Are you willing to submit a PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
