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

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

Commit e8163c9092ab000355152395ad62e758434c373e in airflow's branch 
refs/heads/v1-10-test from Bhavika Tekwani
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=e8163c9 ]

[AIRFLOW-4587] Replace self.conn with self.get_conn() in AWSAthenaHook (#5545)


(cherry picked from commit 10570ef9faf8fd4b431e30db4e59ef0adc1b26a7)


> AWS Athena Hook 'None' connection
> ---------------------------------
>
>                 Key: AIRFLOW-4587
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4587
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: aws, contrib, hooks
>    Affects Versions: 1.10.3
>            Reporter: João Ponte
>            Priority: Trivial
>             Fix For: 1.10.4
>
>
> Problem: 
> In the following hook: 
> [https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/aws_athena_hook.py]
> There is a method get_conn() that initialises conn if it's none but every 
> method in the hook uses conn directly, meaning it will be None when it gets 
> used.
> Checking the AWS Athena Operator, you can see that get_conn() is called right 
> after creating the hook to force initialisation. This is confusing and 
> misleading.
>  
> Solution:
> Replace all calls to self.conn with self.get_conn() to ensure initialisation.



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

Reply via email to