[ 
https://issues.apache.org/jira/browse/AIRFLOW-6358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17004173#comment-17004173
 ] 

ASF subversion and git services commented on AIRFLOW-6358:
----------------------------------------------------------

Commit 81390ee14715ab542a16318e09d43c116e9c0272 in airflow's branch 
refs/heads/v1-10-test from tooptoop4
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=81390ee ]

[AIRFLOW-6358] - log details of failed task (#6908)



(cherry picked from commit 9f86df05afcb577f355bf18754487e389197dfc4)


> print details of failed task
> ----------------------------
>
>                 Key: AIRFLOW-6358
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6358
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: logging
>    Affects Versions: 1.10.6
>            Reporter: t oo
>            Assignee: t oo
>            Priority: Trivial
>             Fix For: 1.10.8
>
>
> task instance.py
>  
> BEFORE
> self.state = State.FAILED
>  if task.retries:
>  self.log.info('All retries failed; marking task as FAILED')
>  else:
>  self.log.info('Marking task as FAILED.')
>  if task.email_on_failure and task.email:
>  self.email_alert(error)
>  
> AFTER
> self.state = State.FAILED
>  if task.retries:
>  self.log.info('All retries failed; marking task as FAILED. 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'))
>  else:
>  self.log.info('Marking task as FAILED. 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'))
>  if task.email_on_failure and task.email:
>  self.email_alert(error)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to