Fokko commented on PR #4512:
URL: https://github.com/apache/iceberg-python/pull/4512#issuecomment-7317555542

   Thanks for the fix! The `integration-test-s3` failure is caused by this 
change, though the change itself is fine. One test depended on how `delete` 
used to work.
   
   `test_s3v4_rest_signer_write_read_delete` fails here:
   
   ```
   >       assert len(request_bodies) == 1
   E       assert 0 == 1
   tests/io/test_fsspec.py:1201
   ```
   
   With s3fs, `fs.rm()` goes through `_bulk_delete`, which sends a 
`DeleteObjects` POST with an XML body. `fs.rm_file()` calls `delete_object`, a 
plain `DELETE` with no body. The REST signer only forwards the request body for 
`DeleteObjects` (added in #4039). This test checks that by calling 
`fileio.delete()` and expecting a forwarded body containing 
`<Key>{filename}</Key>`. The delete itself still works: the `exists()` 
assertion just before it passes.
   
   Could you update the test so it still covers #4039? For example:
   1. Assert that `fileio.delete(location)` removes the file and that the 
signer received a `DELETE` for that key (`signer_body["method"] == "DELETE"`, 
with the key in `signer_body["uri"]`).
   2. Exercise body forwarding through the bulk path directly, e.g. 
`fileio.get_fs("s3").rm([location])`, and keep the `<Key>…</Key>` body 
assertion there.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to