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

Ash Berlin-Taylor resolved AIRFLOW-4907.
----------------------------------------
       Resolution: Duplicate
    Fix Version/s:     (was: 1.10.4)

> AWSAthenaHook - using None connection in a method
> -------------------------------------------------
>
>                 Key: AIRFLOW-4907
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4907
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: aws
>    Affects Versions: 1.10.3
>            Reporter: Bhavika
>            Assignee: Bhavika
>            Priority: Trivial
>              Labels: easyfix
>
> In the AWSAthenaHook 
> [https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/aws_athena_hook.py],
>  the get_conn() method initializes `conn` if it's None. But the 
> `get_state_change_reason()` method uses `conn` which is initialized to None - 
> [https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/aws_athena_hook.py#L98]
>  
>  
> Solution:
> Replace the call to `self.conn` with `self.get_conn()` in order to ensure 
> initialization. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to