-
Notifications
You must be signed in to change notification settings - Fork 527
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
Swift: Add "bulk-delete" URL argument support #1930
Conversation
Build succeeded.
|
@jtopjian ready for review |
We should be able to easily add an acceptance test for this, right? Let me know if you need help. |
@jtopjian just noticed that bulk-delete is also valid for containers. It would be great if you help me with acceptance tests. |
06c6a46
to
07cf4b8
Compare
Build failed.
|
07cf4b8
to
81c85d3
Compare
Build succeeded.
|
According to https://github.com/openstack/swift/blob/a495f1e327fac17246a296721fb1eda8470e4773/swift/common/middleware/bulk.py#L156..L194, bulk delete should have a |
Right. Now I recall that I looked into this in the past and silently backed away 🙂 This means that we'll need to modify In addition, an actual structured response body is sent back, which differs from a normal Swift response where the bulk of the info is in the headers: https://docs.openstack.org/ocata/user-guide/cli-swift-bulk-delete.html In my opinion, a better approach might be to make entirely new functions/actions called
Finally, I think a 409 response (I think this means that only some of the requested containers/objects were deleted) might be a little common and we should either consider treating it as valid response code... but I'm not 100% sure on this, yet. Thoughts? |
@jtopjian no concerns, though at first glance it looked like a low hanging fruit. |
81c85d3
to
5a598bc
Compare
5a598bc
to
b0d9caa
Compare
Build succeeded.
|
@jtopjian I reworked the PR. I also discovered and fixed redundant pointers usage and unencoded container/object names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you!
@jtopjian can you add a release note that container and object names are now urlencoded? |
Sure - but we should try to have things like this in separate PRs. |
Resolves #1721
https://github.com/openstack/swift/blob/a495f1e327fac17246a296721fb1eda8470e4773/swift/common/middleware/bulk.py#L740
Response dict: https://github.com/openstack/swift/blob/a495f1e327fac17246a296721fb1eda8470e4773/swift/common/middleware/bulk.py#L413