You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/04 01:31:24 UTC

[GitHub] [airflow] coopergillan opened a new issue #10147: SqliteHook hard codes connection attribute

coopergillan opened a new issue #10147:
URL: https://github.com/apache/airflow/issues/10147


   **Apache Airflow version**: current `master`
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): N/A
   
   **Environment**: N/A
   
   - **Cloud provider or hardware configuration**: N/A
   - **OS** (e.g. from /etc/os-release): N/A
   - **Kernel** (e.g. `uname -a`): N/A
   - **Install tools**: N/A
   - **Others**: N/A
   
   **What happened**: Looking at `SqliteHook` it appears that the call to `get_connection` is hardcoding the `conn_name_attr` to `sqlite_conn_id`. However, the `DbApiHook` allows `conn_name_attr` to be overridden to support multiple named connections.
   
   This is similar to an issue in `PostgresHook` fixed by f823a66001c9f3682153acbf27bca137d0f4a7ec around a year ago.
   
   **What you expected to happen**: The call to `get_connection` should use whatever the `conn_name_attr` has been set to.
   
   **How to reproduce it**: If a subclass of the hook is created with an overridden `conn_name_attr`, calls to `get_conn` will still hit the original connection specified by `sqlite_conn_id`.


----------------------------------------------------------------
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



[GitHub] [airflow] potiuk closed issue #10147: SqliteHook hard codes connection attribute

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #10147:
URL: https://github.com/apache/airflow/issues/10147


   


----------------------------------------------------------------
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



[GitHub] [airflow] coopergillan commented on issue #10147: SqliteHook hard codes connection attribute

Posted by GitBox <gi...@apache.org>.
coopergillan commented on issue #10147:
URL: https://github.com/apache/airflow/issues/10147#issuecomment-668360761


   @mik-laj - ah, that's right. Thanks for the reminder. I actually created the issue thinking I would come back to it after adding the type annotations. But then when I ran the type checking it helped point out the issue.


----------------------------------------------------------------
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



[GitHub] [airflow] mik-laj commented on issue #10147: SqliteHook hard codes connection attribute

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #10147:
URL: https://github.com/apache/airflow/issues/10147#issuecomment-668353142


   FYI:
   
   > If you create pull-request, you don't have to create an issue first, but if you want, you can do it. Creating an issue will allow you to collect feedback or share plans with other people.
   
   https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow


----------------------------------------------------------------
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