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

ASF GitHub Bot commented on AIRFLOW-3935:
-----------------------------------------

XD-DENG commented on pull request #4752: [AIRFLOW-3935] answer a TODO in 
airflow/executors/local_executor.py
URL: https://github.com/apache/airflow/pull/4752
 
 
   ### Jira
   
     - https://issues.apache.org/jira/browse/AIRFLOW-3935
   
   
   ### Description
   
   The TODO cleared in this PR actually was asking a question, why 'raise e' 
was commented.
   
   To answer why 'raise e' was commented:
   1. This `try-except` is inside method `execute_work()` & there are other 
operations after the try-except as well as after invoking this method. Raising 
exception here will prevent all following steps from taking place properly.
   2. The exception itself is already marked properly by labelling state to be 
FAILED, and the exception is printed out using `self.log.error()`.
   
   
 
----------------------------------------------------------------
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]


> Clear a TODO in airflow/executors/local_executor.py: answer why not 
> explicitly raise exception
> ----------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-3935
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3935
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: executor
>    Affects Versions: 1.10.2
>            Reporter: Xiaodong DENG
>            Assignee: Xiaodong DENG
>            Priority: Trivial
>
> A TODO was added in 
> [https://github.com/apache/airflow/commit/a7a518902dcf1e7fd4bf477cf57cee691f181b29#diff-3f29d663f032bd1b303c1965b78ed83aR51]
>  as a question.
>  
> To explain why “raise e” was commented out:
> - If don’t comment “raise e”, the whole current process will be stopped. 
> Given this try-except is inside method execute_work() and normally there are 
> other operations after invoking this method. Raising exception here will 
> prevent all following steps from taking place.
> - The exception itself is already marked properly by labelling state to be 
> FAILED, and the exception is printed out using self.log.error().



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to