You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/28 10:03:23 UTC

[GitHub] [airflow] pankajastro commented on a diff in pull request #24682: Add test_connection method to GoogleBaseHook

pankajastro commented on code in PR #24682:
URL: https://github.com/apache/airflow/pull/24682#discussion_r908292880


##########
airflow/providers/google/common/hooks/base_google.py:
##########
@@ -580,3 +580,16 @@ def download_content_from_request(file_handle, request: dict, chunk_size: int) -
         while done is False:
             _, done = downloader.next_chunk()
         file_handle.flush()
+
+    def test_connection(self):
+        """Test the Google cloud connectivity from UI"""
+        status, message = False, ''
+        try:
+            if self.project_id:

Review Comment:
   While creating a credential object does it make some call to GCP and confirm or it just deserialises the key JSON file locally and create the credential object if it does locally then this may not be right always for example if wrong project-id in the key file



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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org