You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2024/07/08 17:00:36 UTC

[PR] Log info about task instance clearing/marking as succcess/failure [airflow]

ephraimbuddy opened a new pull request, #40656:
URL: https://github.com/apache/airflow/pull/40656

   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.
   
   Alternative to https://github.com/apache/airflow/pull/39440


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Log info about task instance clearing/marking as succcess/failure [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on PR #40656:
URL: https://github.com/apache/airflow/pull/40656#issuecomment-2239892930

   ok so, it turns out, this information is already more or less available in the UI via the audit log.  recently, i added try_number to the table and added try_number and map_index to the API.  
   and in https://github.com/apache/airflow/pull/40895 i attempt to make the event names a little clearer
   the last remaining thing is to tweak the UI a bit so it's easier to see the events for a specific try number and map index
   maybe later we also add some banners or something when there are events of particular interest
   closing this now 
   cc @bbovenzi 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Log info about task instance clearing/marking as succcess/failure [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #40656:
URL: https://github.com/apache/airflow/pull/40656#discussion_r1669423721


##########
airflow/api/common/mark_tasks.py:
##########
@@ -158,11 +159,13 @@ def set_state(
     qry_dag = get_all_dag_task_query(dag, session, state, task_id_map_index_list, dag_run_ids)
 
     if commit:
+        logger = TaskContextLogger("webserver")

Review Comment:
   It's not certain. It can also come from the REST API.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Log info about task instance clearing/marking as succcess/failure [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish closed pull request #40656: Log info about task instance clearing/marking as succcess/failure
URL: https://github.com/apache/airflow/pull/40656


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Log info about task instance clearing/marking as succcess/failure [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #40656:
URL: https://github.com/apache/airflow/pull/40656#discussion_r1669402858


##########
airflow/api/common/mark_tasks.py:
##########
@@ -158,11 +159,13 @@ def set_state(
     qry_dag = get_all_dag_task_query(dag, session, state, task_id_map_index_list, dag_run_ids)
 
     if commit:
+        logger = TaskContextLogger("webserver")

Review Comment:
   is this certain to be webserver or might it also be API?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org