yuqian90 commented on pull request #13037:
URL: https://github.com/apache/airflow/pull/13037#issuecomment-744382431
> @yuqian90 I think this button can also apply to Mark Failed.
> If the downstream task has trigger rule of one_failed / all_failed etc
Hi @RosterIn I agree it's a possible use case. However, supporting that
actually requires some more work. The current PR is using this convenience
method `DAG.clear()` like this. After marking the task success, the
`only_failed=True` argument makes sure that task does not get cleared by this
line of code here. However, to use the same code for Mark Failed means that
it's going to clear the task itself (that was just marked failed).
```python
subdag.clear(
start_date=start_date,
end_date=end_date,
include_subdags=True,
include_parentdag=True,
only_failed=True,
session=session,
)
```
To Mark Failed work work with Resume is not difficult, probably just need to
add another argument to `DAG.clear()` to exclude the task itself or something
like that. That requires more work and testing.
That said, `one_failed` or `all_failed` are much less common than
`all_success`. So I'm tempted to doing that in another PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]