turbaszek commented on a change in pull request #7869: [AIRFLOW-5801] Get GCP 
credentials from file instead of JSON blob
URL: https://github.com/apache/airflow/pull/7869#discussion_r397882932
 
 

 ##########
 File path: airflow/providers/google/cloud/hooks/cloud_sql.py
 ##########
 @@ -520,12 +520,12 @@ def _get_credential_parameters(self, session: Session) 
-> List[str]:
         connection = session.query(Connection). \
             filter(Connection.conn_id == self.gcp_conn_id).first()
         session.expunge_all()
-        if GCP_CREDENTIALS_KEY_PATH in connection.extra_dejson:
+        if connection.extra_dejson.get(GCP_CREDENTIALS_KEY_PATH):
             credential_params = [
                 '-credential_file',
                 connection.extra_dejson[GCP_CREDENTIALS_KEY_PATH]
             ]
-        elif GCP_CREDENTIALS_KEYFILE_DICT in connection.extra_dejson:
+        elif connection.extra_dejson.get(GCP_CREDENTIALS_KEYFILE_DICT):
 
 Review comment:
   Is this change necessary? Personally I think the current version is more 
accurate

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

Reply via email to