[ 
https://issues.apache.org/jira/browse/AIRFLOW-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510350#comment-16510350
 ] 

ASF subversion and git services commented on AIRFLOW-2512:
----------------------------------------------------------

Commit 0f4d681f6f6e15acd1399dede146e75cb688d536 in incubator-airflow's branch 
refs/heads/master from Tim Swast
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=0f4d681 ]

[AIRFLOW-2512][AIRFLOW-2522] Use google-auth instead of oauth2client

* Updates the GCP hooks to use the google-auth
library and removes
  dependencies on the deprecated oauth2client
package.
* Removes inconsistent handling of the scope
parameter for different
  auth methods.

Note: using google-auth for credentials requires a
newer version of the
google-api-python-client package, so this commit
also updates the
minimum version for that.

To avoid some annoying warnings about the
discovery cache not being
supported, so disable the discovery cache
explicitly as recommend here:
https://stackoverflow.com/a/44518587/101923

Tested by running:

    nosetests
tests/contrib/operators/test_dataflow_operator.py
\
        tests/contrib/operators/test_gcs*.py \
        tests/contrib/operators/test_mlengine_*.py \
        tests/contrib/operators/test_pubsub_operator.py \
        tests/contrib/hooks/test_gcp*.py \
        tests/contrib/hooks/test_gcs_hook.py \
        tests/contrib/hooks/test_bigquery_hook.py

and also tested by running some GCP-related DAGs
locally, such as the
Dataproc DAG example at
https://cloud.google.com/composer/docs/quickstart

Closes #3488 from tswast/google-auth


> GoogleCloudBaseHook using deprecated oauth2client
> -------------------------------------------------
>
>                 Key: AIRFLOW-2512
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2512
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: contrib
>            Reporter: Tim Swast
>            Assignee: Tim Swast
>            Priority: Minor
>
> oauth2client is deprecated in favor of the google-auth library. 
> [https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html]
> The GoogleCloudBaseHook should be updated to use the google-auth library.
> Note: to use the google-auth library with the google-api-python-client, the 
> API client library may also require an update.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to