ashb commented on a change in pull request #13929:
URL: https://github.com/apache/airflow/pull/13929#discussion_r570137851



##########
File path: airflow/sentry.py
##########
@@ -151,15 +151,15 @@ def enrich_errors(self, func):
             """Wrap TaskInstance._run_raw_task to support task specific tags 
and breadcrumbs."""
 
             @wraps(func)
-            def wrapper(task_instance, *args, session=None, **kwargs):
+            def wrapper(task_instance, *args, **kwargs):
                 # Wrapping the _run_raw_task function with push_scope to 
contain
                 # tags and breadcrumbs to a specific Task Instance
                 with sentry_sdk.push_scope():
                     try:
-                        return func(task_instance, *args, session=session, 
**kwargs)
+                        return func(task_instance, *args, **kwargs)
                     except Exception as e:
                         self.add_tagging(task_instance)
-                        self.add_breadcrumbs(task_instance, session=session)
+                        self.add_breadcrumbs(task_instance)

Review comment:
       @Junnplus Probably worth doing, yeah.
   
   We already have 
https://github.com/apache/airflow/blob/49aa9aa2cd6e36ec211382d30a58e279755b0962/airflow/utils/session.py
 -- so perhaps that could be extracted somehow to not have duplicated logic?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to