uranusjr commented on issue #16986:
URL: https://github.com/apache/airflow/issues/16986#issuecomment-880418133
If you already know some Flask, what you need to do is to add a form in the
UI that POST to a new view. That view should take the current task instance’s
id, select it out, set its state to `UP_FOR_RETRY`, and then redirect back to
the task instance view, similar to `TaskInstanceModelView.action_set_retry`
(actually you can just post to that view, but the view is built against
Flask-Appbuilder and manually POST-ing to it is a giant PITA that I strongly
recommended against).
The form should look something like this:
```html
<form action="{{ url_for('name_of_view') }}" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="dag_id" value="{{ dag_id }}">
<input type="hidden" name="task_id" value="{{ task_id }}">
<button type="submit">Retry Task</button>
</form>
```
--
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]