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 2021/02/20 22:42:47 UTC

[GitHub] [airflow] r-richmond opened a new issue #14340: Airflow upgrade_check likely issuing false warnings

r-richmond opened a new issue #14340:
URL: https://github.com/apache/airflow/issues/14340


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Apache Airflow version**: 1.10.14
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: docker-compose
   - **OS** (e.g. from /etc/os-release): centos
   - **Kernel** (e.g. `uname -a`): unsure
   - **Install tools**: pipenv
   
   <details><summary>Installed Versions</summary> 
   
   ```
   apache-airflow                                 1.10.14
   apache-airflow-backport-providers-apache-hdfs  2020.10.29
   apache-airflow-backport-providers-apache-spark 2020.10.29
   apache-airflow-backport-providers-apache-sqoop 2020.10.29
   apache-airflow-backport-providers-google       2021.2.5
   apache-airflow-backport-providers-http         2021.2.5
   apache-airflow-backport-providers-jdbc         2020.10.29
   apache-airflow-backport-providers-postgres     2020.10.29
   apache-airflow-backport-providers-salesforce   2020.10.29
   apache-airflow-backport-providers-sftp         2021.2.5
   apache-airflow-backport-providers-slack        2021.2.5
   apache-airflow-backport-providers-ssh          2021.2.5
   apache-airflow-upgrade-check                   1.2.0
   ```
    </details>
   
   **What happened**:
   
   Running `airflow upgrade_check` threw the following warning
   
   `2.  Class <class 'airflow.hooks.http_hook.HttpHook'> incorrectly implements the function run while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead`
   
   I thought that replacing it with the provider pathed hook would make this go away but instead
   
   `1.  Class <class 'airflow.providers.http.hooks.http.HttpHook'> incorrectly implements the function run while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead`
   
   <details><summary>Full output </summary>
   
   ```
   Hooks that run DB functions must inherit from DBApiHook
   -------------------------------------------------------
   Hooks that run DB functions must inherit from DBApiHook instead of BaseHook
   
   Problems:
   
     1.  Class <class 'airflow.providers.http.hooks.http.HttpHook'> incorrectly implements the function run while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     2.  Class <class 'airflow.hooks.http_hook.HttpHook'> incorrectly implements the function run while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     3.  Class <class 'airflow.hooks.hive_hooks.HiveServer2Hook'> incorrectly implements the function get_pandas_df while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     4.  Class <class 'airflow.hooks.hive_hooks.HiveServer2Hook'> incorrectly implements the function get_records while inheriting from BaseHook. Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
   ```
   
   </details>
   
   **What you expected to happen**: No warnings for builtin airflow hooks
   
   **How to reproduce it**:
   
   
   **Anything else we need to know**:
   
   Discussion Thread in [Slack](https://apache-airflow.slack.com/archives/C0146STM600/p1613791442001400): 


----------------------------------------------------------------
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] eladkal closed issue #14340: Airflow upgrade_check likely issuing false warnings

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


   


----------------------------------------------------------------
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] kaxil commented on issue #14340: Airflow upgrade_check likely issuing false warnings

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


   Fixed by https://github.com/apache/airflow/pull/14344 and will be released in **upgrade check 1.3.0**


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