You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "nexoriv (Jira)" <ji...@apache.org> on 2020/03/02 07:56:00 UTC

[jira] [Commented] (AIRFLOW-5801) CloudSqlProxyRunner always assumes GCP credentials are passed via file instead of JSON blob

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

nexoriv commented on AIRFLOW-5801:
----------------------------------

is it even possible to pass the connection as json BLOB?
[~kaxilnaik] [~turbaszek]

> CloudSqlProxyRunner always assumes GCP credentials are passed via file instead of JSON blob
> -------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-5801
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5801
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: gcp
>    Affects Versions: 1.10.5
>            Reporter: Dan Huang
>            Priority: Major
>
> See:
>  * [https://github.com/apache/airflow/blob/fc4aa041b0f944d3b1f1b2d045a0518827f054a2/airflow/gcp/hooks/cloud_sql.py#L512]
>  * [https://github.com/apache/airflow/blob/1.10.5/airflow/contrib/hooks/gcp_sql_hook.py#L488]
>  
> Very quick fix here is to replace
>  
> {code:java}
> if GCP_CREDENTIALS_KEY_PATH in connection.extra_dejson:
> {code}
> with
>  
> {code:java}
> if connection.extra_dejson.get(GCP_CREDENTIALS_KEY_PATH):{code}
> And similarly for the lines below.
> But perhaps falsy values for connection keys should just be scrubbed?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)