ashb commented on a change in pull request #4741: [AIRFLOW-3924] Fix try number 
for alert emails
URL: https://github.com/apache/airflow/pull/4741#discussion_r259270120
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -1730,6 +1730,8 @@ def email_alert(self, exception):
         # For reporting purposes, we report based on 1-indexed,
         # not 0-indexed lists (i.e. Try 1 instead of
         # Try 0 for the first attempt).
+        # This function is called after changing the state
+        # from State.RUNNING so need to subtract 1 from self.try_number.
 
 Review comment:
   Could you move this comment to line 1720 instead of here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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