airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Log info about task instance clearing/marking as succcess/failure

Open ephraimbuddy opened this issue 1 year ago • 4 comments

When a task is cleared or marked as failed/successful, we do not have much information other than that the state of the task instance has been externally set to restarting, succes or failed.

This PR adds information about this clearing/marking as success or failed in the log so that users can know exactly what happened.

To make this work, I had to introduce session to TaskContextLogger as without it, when the log is sent, the task instance fails.

Clearing a task from the UI: Screenshot 2024-05-06 at 16 31 39

Marking failed from the UI Screenshot 2024-05-06 at 16 16 47

ephraimbuddy avatar May 06 '24 17:05 ephraimbuddy

@ephraimbuddy would it be helpful to also log the user that performed the clear/delete action?

seanmuth avatar May 07 '24 17:05 seanmuth

@ephraimbuddy would it be helpful to also log the user that performed the clear/delete action?

I don't think it will be possible but I will check.

ephraimbuddy avatar May 07 '24 22:05 ephraimbuddy

This broke REST API clearing/marking as failed/success. Still investigating

ephraimbuddy avatar May 08 '24 14:05 ephraimbuddy

This broke REST API clearing/marking as failed/success. Still investigating

This has been resolved

ephraimbuddy avatar May 09 '24 17:05 ephraimbuddy

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 24 '24 00:06 github-actions[bot]