GH-40052: [C++][FS][Azure] Fix CreateDir and DeleteDir trailing slash issues on hierarchical namespace accounts#40054
Merged
felipecrv merged 4 commits intoapache:mainfrom Feb 13, 2024
Conversation
felipecrv
reviewed
Feb 13, 2024
| AssertFileInfo(fs(), blob_path, FileType::NotFound); | ||
| } | ||
|
|
||
| void TestDeleteDirSuccessHaveBlobWithTrailingSlash() { |
Contributor
There was a problem hiding this comment.
I would rename this to TestNonEmptyDirWithTrailingSlash. "have blob with trailing slash" can be misinterpreted as the blob path itself having a trailing slash.
felipecrv
approved these changes
Feb 13, 2024
Contributor
felipecrv
left a comment
There was a problem hiding this comment.
Thank you for catching and fixing this. I was careful with trailing slashes in the Move() implementation and tests, but missed this one in CreateDir.
felipecrv
approved these changes
Feb 13, 2024
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0dbbd43. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them. |
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this pull request
Feb 19, 2024
… slash issues on hierarchical namespace accounts (apache#40054) ### Rationale for this change There were the following failure cases ``` fs->CreateDir("directory/") ``` ``` fs->DeleteDir("directory/") ``` They fail with ``` Failed to delete a directory: directory/: https://tomtesthns.blob.core.windows.net/ea119933-c9d3-11ee-989a-71cec6336ac8/directory/ Azure Error: [InvalidUri] 400 The request URI is invalid. The request URI is invalid. RequestId:c9ad826a-101f-0005-5be0-5d0db4000000 Time:2024-02-12T18:24:12.9974541Z Request ID: c9ad826a-101f-0005-5be0-5d0db4000000 ``` ### What changes are included in this PR? Add tests to cover these cases. Remove trailing slashes to avoid these issues. ### Are these changes tested? Yes. I added new test cases to cover these cases. I was rather torn about whether to add precise tests like I've done or to duplicate every test case we had and run it a second time with trailing slashes. ### Are there any user-facing changes? Fixed bug on `CreateDir` and `DeleteDir`. * Closes: apache#40052 Authored-by: Thomas Newton <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
There were the following failure cases
They fail with
What changes are included in this PR?
Add tests to cover these cases.
Remove trailing slashes to avoid these issues.
Are these changes tested?
Yes. I added new test cases to cover these cases. I was rather torn about whether to add precise tests like I've done or to duplicate every test case we had and run it a second time with trailing slashes.
Are there any user-facing changes?
Fixed bug on
CreateDirandDeleteDir./#40052