aru-trackunit commented on code in PR #29694:
URL: https://github.com/apache/airflow/pull/29694#discussion_r1119926887


##########
airflow/providers/google/suite/hooks/drive.py:
##########
@@ -159,6 +160,57 @@ def exists(
             )
         )
 
+    def _get_file_info(self, file_id: str):
+        """
+        Returns Google API file_info object containing id, name, parents in 
the response
+        https://developers.google.com/drive/api/v3/reference/files/get
+
+        :param file_id: id as string representation of interested file
+        :return: file
+        """
+        file_info = (
+            self.get_conn().files()
+                .get(
+                fileId=file_id,
+                fields="id,name,parents",
+                supportsAllDrives=True,
+            ).execute()
+        )
+        return file_info

Review Comment:
   You're right. Any exception that is thrown from google we want to handle 
within this feature, as it doesn't make any sense to fail the job due to 
unresolving file path. I updated the 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to