potiuk commented on a change in pull request #7257: [AIRFLOW-6636] Avoid
exceptions when printing task instance
URL: https://github.com/apache/airflow/pull/7257#discussion_r370990340
##########
File path: airflow/models/taskinstance.py
##########
@@ -1137,18 +1143,30 @@ def handle_failure(self, error, test_mode=None,
context=None, session=None):
'dag_id=%s, task_id=%s, execution_date=%s,
start_date=%s, end_date=%s',
self.dag_id,
self.task_id,
- self.execution_date.strftime('%Y%m%dT%H%M%S'),
- self.start_date.strftime('%Y%m%dT%H%M%S'),
- self.end_date.strftime('%Y%m%dT%H%M%S'))
+ self.execution_date.strftime('%Y%m%dT%H%M%S') if
hasattr(
+ self,
+ 'execution_date') and self.execution_date else '',
+ self.start_date.strftime('%Y%m%dT%H%M%S') if hasattr(
+ self,
+ 'start_date') and self.start_date else '',
+ self.end_date.strftime('%Y%m%dT%H%M%S') if hasattr(
Review comment:
Let me know how you want to proceed please :)
----------------------------------------------------------------
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]
With regards,
Apache Git Services