You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/06/23 17:59:00 UTC

[jira] [Commented] (AIRFLOW-4587) AWS Athena Hook 'None' connection

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

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

eladkal commented on pull request #5462: [AIRFLOW-4587] Replace self.conn with self.get_conn() in AWSAthenaHook
URL: https://github.com/apache/airflow/pull/5462
 
 
   ### Jira
   
     - https://issues.apache.org/jira/browse/AIRFLOW-4587
   
   ### Description
   
   - Prevent from functions in the hook to use the `self.conn` variable directly.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>
> 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.3#76005)