moiseenkov commented on code in PR #34545:
URL: https://github.com/apache/airflow/pull/34545#discussion_r1348368489


##########
airflow/providers/google/suite/transfers/gcs_to_gdrive.py:
##########
@@ -95,7 +95,7 @@ def __init__(
         source_bucket: str,
         source_object: str,
         destination_object: str | None = None,
-        destination_folder_id: str | None = None,
+        destination_folder_id: str = "root",

Review Comment:
   Indeed. [API 
documentation](https://developers.google.com/drive/api/guides/folder) claims 
that 
   ```
   you can use the alias root to refer to the root folder anywhere a file ID is 
provided.
   ```
   So it is a good default value for the folder id and it is already used in 
the 
[hook](https://github.com/apache/airflow/blob/main/airflow/providers/google/suite/hooks/drive.py#L263).
 But the operator's default value is inconsistent and actually causes errors: 
the execution comes to [this 
method](https://github.com/apache/airflow/blob/main/airflow/providers/google/suite/hooks/drive.py#L163)
 which fails when it passes `None` to the [API 
call](https://developers.google.com/drive/api/reference/rest/v3/files/get). 
That's shy these changes are fixing, not breaking. 



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