jstern commented on a change in pull request #7133: [AIRFLOW-6535] add 
exception to fail without retry
URL: https://github.com/apache/airflow/pull/7133#discussion_r374756688
 
 

 ##########
 File path: tests/models/test_taskinstance.py
 ##########
 @@ -1475,6 +1476,8 @@ def test_handle_failure(self):
                               dag=dag)
         ti1 = TI(task=task1, execution_date=start_date)
         ti1.state = State.FAILED
+        ti1.start_date = start_date
+        ti1.end_date = end_date
 
 Review comment:
   for more context, here is the failure that cropped up during the execution 
of existing test code after I narrowed the scope of the try/except to only be 
around sending the email. my mistake, it was an AttributeError not a TypeError 
:)
   
   ```
           self.log.info(
               '%s dag_id=%s, task_id=%s, execution_date=%s, start_date=%s, 
end_date=%s',
               log_message,
               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')
           )
   E       AttributeError: 'NoneType' object has no attribute 'strftime'
   ```

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

Reply via email to