[ 
https://issues.apache.org/jira/browse/AIRFLOW-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaodong DENG updated AIRFLOW-3935:
-----------------------------------
    Description: 
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:
 - Given this try-except is inside method execute_work() and there are other 
operations after the try-except and 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().

  was:
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().


> 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:
>  - Given this try-except is inside method execute_work() and there are other 
> operations after the try-except and 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