Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise Exception if wr.s3.delete_objects failed #237

Closed
bryanyang0528 opened this issue May 15, 2020 · 4 comments
Closed

raise Exception if wr.s3.delete_objects failed #237

bryanyang0528 opened this issue May 15, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request minor release Will be addressed in the next minor release
Milestone

Comments

@bryanyang0528
Copy link
Contributor

Is your idea related to a problem? Please describe.
I used wr.s3.delete_objects to delete something on s3. Even if the action failed(due to permission issue), the function still return nothing to me. So I do not know if it is success or not.

Describe the solution you'd like
wr.s3.delete_objects will call client_s3.delete_objects from boto3 to delete something. I would like to parse the response of client_s3.delete_objects to determine if this request is success or not.

reference: S3.Client.delete_objects

@bryanyang0528 bryanyang0528 added the enhancement New feature or request label May 15, 2020
@igorborgest igorborgest self-assigned this May 15, 2020
@igorborgest igorborgest added this to the 1.2.0 milestone May 15, 2020
@igorborgest igorborgest added minor release Will be addressed in the next minor release WIP Work in progress labels May 15, 2020
@igorborgest
Copy link
Contributor

@bryanyang0528 awesome contribution, thanks!

This enhancement will be released on version 1.2.0.

@bryanyang0528
Copy link
Contributor Author

bryanyang0528 commented May 17, 2020

@igorborgest The test cases of this project need a real AWS environment to test. But this way is more expensive and slower than the mocking way. Could I add test cases using moto to test some basic s3 operators? I could add this test process to CI setting too. Is this idea good for you?

@igorborgest
Copy link
Contributor

@bryanyang0528 yeah it sounds pretty good to me.

Today we already have a minimal set of tests with moto under testing/test_awswrangler/test_moto.py.

You can run it with:

pytest testing/test_awswrangler/test_moto.py

But for sure there is a lot of room for improvement and also to add it to GitHub Actions. Good ideia!

I don’t see this project running tests only against moto for all, but for sure could be a good alternative for those that want to test it w/o provisioning real AWS resources and for a faster/minimal test on GitHub actions.

@igorborgest
Copy link
Contributor

Thanks a lot @bryanyang0528 !

Released on version 1.2.0

@igorborgest igorborgest removed the WIP Work in progress label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor release Will be addressed in the next minor release
Projects
None yet
Development

No branches or pull requests

2 participants