potiuk commented on issue #5335: [AIRFLOW-4588] Add GoogleApiClientHook URL: https://github.com/apache/airflow/pull/5335#issuecomment-496952575 So far we used slightly different approach for GCP services: 1) In most cases (and this is preferred per official google recommendations) instead of discovery API we used the new python-idiomatic APIs, specific for each service. See for example here: https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/gcp_spanner_hook.py Discovery API is officially deprecated by Google (but still works so far) 2) whenever there is no python-idiomatic API or it is not enough, discovery API is used (for example: https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/gcp_compute_hook.py). Each such hook is implemented separately (and it's usually not a lot of code per hook - especially the query method is usually few lines of code) 3) In both discovery and idiomatic APIs we use this base hook (it provides authentication that is usable by both types of APIs + exception handling + default project_id handling): https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/gcp_api_base_hook.py The only part which is not in the gcp_api_base_hook.py (from this proposal) is some common way of handling pagination. @feluelle -> are you aware of the implementation ? Do you see any problem with following the approach of other GCP operators that you need to solve? Maybe the pagination could be implemented in the gcp_api_base_hook instead if you think it's worth to implement some common code?
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services