potiuk commented on code in PR #29694:
URL: https://github.com/apache/airflow/pull/29694#discussion_r1117220804


##########
airflow/providers/google/suite/hooks/drive.py:
##########
@@ -243,8 +284,13 @@ def upload_file(
             .create(body=file_metadata, media_body=media, fields="id", 
supportsAllDrives=True)
             .execute(num_retries=self.num_retries)
         )
-        self.log.info("File %s uploaded to gdrive://%s.", local_location, 
remote_location)
-        return file.get("id")
+        file_id = file.get("id")
+
+        upload_location = (

Review Comment:
   BTW. I have no idea how it works, and  whether it's possible, just raised it 
as possible scenario where such traversal might fail. There might be other 
cases (is this possible there is more than one parent maybe? Or some rate 
limiting when calling an API). So I am not really sure if the scenario is 
possible, and which scenario might be problematic, my only point here was that 
we shoulkd  have an escape hatch in such case. This traversal is only needed to 
log the full destination path, it's not used anywhere else, so IMHO we should 
be able to disable it in case any of similar things happen. I am not sure if 
those are likely scenarios/issues currently (they might also change in the 
future), so without spending a lot of time on analysing those, having a simple 
to use escape hatch seems to be a good idea :D)



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