dimonchik-suvorov commented on PR #30125: URL: https://github.com/apache/airflow/pull/30125#issuecomment-1492012923
Sorry guys, got sick... but back now :) @hussein-awala if I'll use `dag_run_state` I'm afraid it will not help... ### First suggestion > `if dr.state in (State.SUCCESS, State.FAILED) or dag_run_state` and set the default value of `dag_run_state` to `False` For example I'm going to clear **finished** (let's say `failed`) Dagrun from Dagrun page. According to [this code](https://github.com/apache/airflow/blob/main/airflow/www/views.py#LL5216C21-L5216C21) in your case it will not reset Dagrun state and will not set it to `queued`. In this case I have to do multiple checks everywhere in the code where we are using `clear_task_instances` function and check do we actually need to reset the state or not and set `dag_run_state` explicitly everywhere. And I'm doing it only in one place now. ### Second suggestion > update the call of this method in the BaseOperator I'm not familiar with this part of code, could you please explain how changes in `BaseOperator` will fix the issue when user clearing a Dagrun from UI? -- 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]
