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



##########
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:
       This will make the add_breadcrumbs use a different session object --  
that's not great.
   
   I wonder if instead the place where session is passed as a positional 
argument should be converted to use kwargs instead? 




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