-
Notifications
You must be signed in to change notification settings - Fork 339
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
fix: allow nested paths for multipart upload #2951
Conversation
This LGTM, but if I correctly recall, @acud was concerned about making sure this works correctly, so maybe add some tests that the nested paths are correctly handled? |
So the tests are enabled in this PR. The tests upload using both tar and multipart once the The problem was w.r.t tar, by virtue of the tar format being correct we know that the directory structure is valid. In the case of multipart, users can specify incorrect paths and there is no way to actually verify this. With this PR, if used correctly the feature will be enabled. If this assumption is okay we dont need any more changes I believe. |
Ok sounds good to me. Regarding bad paths. To my understanding, we support UNIX-like paths in Bee, right? If so, then I think there are a few checks that can be done here, which in the
And maybe more, these are just from top of my head. |
So this was the problem why we disallowed the multipart upload in the first place. Handling all the corner cases would be too many checks in my opinion. The manifest is a key-value store and should work fine for any unique path names. This way if there are any developer-induced errors for some reason, this would manifest when they try to access the files. If the feature is used correctly everything should work. If we are okay with this we can use this change as is. I am not really sure what are all the cases covered by the tar format. But since it needs a filesystem to create, we can rest assured it is some valid structure. Unlike this case. |
So I agree with @aloknerurkar that it can be a bit more tricky than it might seem in the first place. Don't forget that stuff like Not sure what is the question/input you need from me now though. Is it about how to go about creating further test coverage? |
Sooo, this is up to you guys if you want to merge it in the current form, but here are my 5 cents. |
So the outcome of our API Guild call yesterday is that |
Checklist
Description
Motivation and context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):
This change is