jorisvandenbossche commented on issue #38618:
URL: https://github.com/apache/arrow/issues/38618#issuecomment-1820764047

   I am trying to reproduce it using our test infrastructure with minio. 
However, I haven't been able to do so, and so it might be specific to actual 
AWS S3, and not reproducible with minio.
   
   I ran your reproducer script above using pyarrow 14.0 and a minio server 
running, and I get:
   
   ```
   Single dir deleted: [True]
   Dir with content deleted: [True]
   Dir with sub dir deleted: [True]
   Dir deleted after subdir removed explicitly: [True]
   Dir deleted with blob in implicit subdir: [True]
   Dir deleted with blob in explicit subdir: [True]
   ```
   
   And I also tried to mimic the reproducer into a test function that can be 
dropped into `test_fs.py` using our test infrastructure (containing the two 
failure cases):
   
   ```python
   def test_delete_dir_with_explicit_subdir(fs, pathfn):
       skip_fsspec_s3fs(fs)
   
       d = pathfn('directory/')
       nd = pathfn('directory/nested/')
   
       # deleting dir with explicit subdir
       fs.create_dir(d)
       fs.create_dir(nd)
       fs.delete_dir(d)
       dir_info = fs.get_file_info(d)
       assert dir_info.type == FileType.NotFound
   
       # deleting dir with blob in explicit subdir
       d = pathfn('directory2')
       nd = pathfn('directory2/nested')
       f = pathfn('directory2/nested/target-file')
   
       fs.create_dir(d)
       fs.create_dir(nd)
       with fs.open_output_stream(f) as s:
           s.write(b'data')
   
       fs.delete_dir(d)
       dir_info = fs.get_file_info(d)
       assert dir_info.type == FileType.NotFound
   ```
   
   But this passes for all tested filesystems.


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