Ma77Ball opened a new pull request, #5249:
URL: https://github.com/apache/texera/pull/5249

   ### What changes were proposed in this PR?
   - Move `s3.delete_object(...)` from `_cleanup_failed_upload()` into the 
upload worker, reusing the `s3` client already captured by the closure that did 
the upload.
   - Drop the `_cleanup_failed_upload()` method and the call to it from 
`close()`; the worker now handles cleanup before recording the exception.
   - `close()` and `__del__` no longer call back into `large_binary_manager`, 
so a finalizer firing under a later test's monkey-patches cannot reach the 
wrong S3 client.
   ### Any related issues, documentation, or discussions?
   Closes: #5245 Follow-up to #4707; surfaced on the 3.12 leg of 
https://github.com/apache/texera/actions/runs/26481776334/job/77980417021.
   ### How was this PR tested?
   - Ran `ruff format` and `ruff check` over `amber/src/main/python` and 
`amber/src/test/python` (clean).
   - Existing tests in `test_large_binary_output_stream.py` still cover the 
relevant paths: `test_close_handles_upload_error`, 
`test_delete_object_failure_is_swallowed`, and 
`test_write_after_upload_error_raises_error`.
   - Simplified `test_write_after_upload_error_raises_error` back to inline 
form and removed the `_drained` helper, both no longer needed once cleanup is 
structurally contained.
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.7 in compliance with ASF


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