justinpakzad commented on code in PR #74943:
URL: https://github.com/apache/airflow/pull/74943#discussion_r4395586036


##########
task-sdk/src/airflow/sdk/io/path.py:
##########
@@ -463,7 +463,7 @@ def move(self, path: str | ObjectStoragePath, recursive: 
bool = False, **kwargs)
 
         # non-local copy
         self.copy(path, recursive=recursive, **kwargs)

Review Comment:
   Yea, good call. We now raise when the source is a directory and recursive is 
False. 



##########
task-sdk/tests/task_sdk/io/test_path.py:
##########
@@ -349,6 +363,19 @@ def test_bucket_key_protocol(self):
         assert o.key == key
         assert o.protocol == protocol
 
+    @mock.patch.object(_FakeRemoteFileSystem, "mkdir", autospec=True)
+    def test_copy_dir_to_new_remote_dir(self, mock_mkdir, fake_remote_stores):
+        bucket = uuid.uuid4().hex
+        src = ObjectStoragePath(f"ffs://{bucket}/src")

Review Comment:
   Added an additional test case.



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