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



##########
File path: airflow/sentry.py
##########
@@ -159,8 +162,14 @@ def wrapper(task_instance, *args, **kwargs):
 
                 with sentry_sdk.push_scope():
                     try:
-                        return func(task_instance, *args, **kwargs)
+                        return func(_self, *args, **kwargs)
                     except Exception as e:
+                        # Is a LocalTaskJob
+                        if hasattr(_self, 'task_instance'):
+                            task_instance = _self
+                        else:
+                            task_instance = _self

Review comment:
       You aren't the only one to miss it!




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