You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/09 18:56:30 UTC

[GitHub] [airflow] ashb commented on a change in pull request #18119: Fix Sentry handler from LocalTaskJob causing error

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

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