jason810496 commented on code in PR #70951:
URL: https://github.com/apache/airflow/pull/70951#discussion_r3701641837


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -529,6 +530,15 @@ def ti_update_state(
                     task_id=task_id,
                 )
 
+    # Release the task_instance row lock before running listener callbacks.
+    session.commit()
+
+    for callback in asset_callbacks:
+        try:
+            callback()
+        except Exception:
+            log.warning("Failed to run deferred asset listener callback", 
exc_info=True)

Review Comment:
   nit: It seems we can safely remove the try/ except with logging here as the 
`nofity_asset_event_emitted` itself already handled the exception.
   
   
https://github.com/apache/airflow/blob/182919ac348badad1f235ba058fe52aa86339098/airflow-core/src/airflow/assets/manager.py#L418-L432
   
   
https://github.com/apache/airflow/blob/182919ac348badad1f235ba058fe52aa86339098/airflow-core/src/airflow/assets/manager.py#L508-L514



-- 
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]

Reply via email to