[
https://issues.apache.org/jira/browse/AIRFLOW-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16882817#comment-16882817
]
ASF GitHub Bot commented on AIRFLOW-4907:
-----------------------------------------
ashb commented on pull request #5545: [AIRFLOW-4907] AWSAthenaHook - using None
connection in a method
URL: https://github.com/apache/airflow/pull/5545
----------------------------------------------------------------
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:
[email protected]
> 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)