amaraliou opened a new issue #14541:
URL: https://github.com/apache/airflow/issues/14541


   **Apache Airflow version**:
   1.10.4
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   N/A
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: GCP
   - **OS** (e.g. from /etc/os-release): Ubuntu 18.04.4 LTS
   - **Kernel** (e.g. `uname -a`): N/A
   - **Install tools**: pip
   
   **What happened**:
   
   Running `airflow upgrade_check` threw the following warnings:
   ```
     1.  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
     2.  Class <class 'airflow.contrib.hooks.bigquery_hook.BigQueryHook'> 
incorrectly implements the function get_pandas_df while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
     3.  Class <class 'airflow.contrib.hooks.bigquery_hook.BigQueryHook'> 
incorrectly implements the function run while inheriting from BaseHook. Please 
make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     4.  Class <class 'airflow.contrib.hooks.bigquery_hook.BigQueryHook'> 
incorrectly implements the function get_records while inheriting from BaseHook. 
Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     5.  Class <class '_hooks.gc_bigquery_hook.BigQueryStandardHook'> 
incorrectly implements the function get_pandas_df while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
     6.  Class <class '_hooks.gc_bigquery_hook.BigQueryStandardHook'> 
incorrectly implements the function run while inheriting from BaseHook. Please 
make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     7.  Class <class '_hooks.gc_bigquery_hook.BigQueryStandardHook'> 
incorrectly implements the function get_records while inheriting from BaseHook. 
Please make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
     8.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.BigQueryStandardHook'>
 incorrectly implements the function get_pandas_df while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
     9.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.BigQueryStandardHook'>
 incorrectly implements the function run while inheriting from BaseHook. Please 
make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
    10.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.BigQueryStandardHook'>
 incorrectly implements the function get_records while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
    11.  Class <class '_hooks.gc_bigquery_hook.GCBigQueryHook'> incorrectly 
implements the function get_pandas_df while inheriting from BaseHook. Please 
make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
    12.  Class <class '_hooks.gc_bigquery_hook.GCBigQueryHook'> incorrectly 
implements the function run while inheriting from BaseHook. Please make this 
class inherit from airflow.hooks.db_api_hook.DbApiHook instead
    13.  Class <class '_hooks.gc_bigquery_hook.GCBigQueryHook'> incorrectly 
implements the function get_records while inheriting from BaseHook. Please make 
this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
    14.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.GCBigQueryHook'>
 incorrectly implements the function get_pandas_df while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
    15.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.GCBigQueryHook'>
 incorrectly implements the function run while inheriting from BaseHook. Please 
make this class inherit from airflow.hooks.db_api_hook.DbApiHook instead
    16.  Class <class 
'unusual_prefix_9358643817187292af016429303a09afd4152fc5_gc_bigquery_hook.GCBigQueryHook'>
 incorrectly implements the function get_records while inheriting from 
BaseHook. Please make this class inherit from 
airflow.hooks.db_api_hook.DbApiHook instead
   ```
   
   The custom hooks all inherit from `BigQueryHook`. Looking at the code, it 
inherits both `DbApiHook` and `GoogleCloudBaseHook` which inherits `BaseHook`. 
I also noticed that the same `BigQueryHook` implementation appears in the 
`2.0-stable` branch so this is probably a false positive. The warning (1) is 
already fixed by https://github.com/apache/airflow/pull/14344.
   
   **What you expected to happen**:
   
   No warnings
   
   **How to reproduce it**: N/A
   
   


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


Reply via email to