You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "raulcd (via GitHub)" <gi...@apache.org> on 2026/06/17 09:22:37 UTC
[I] [C++] S3FileSystem::MakeUri drops bucket from path [arrow]
raulcd opened a new issue, #50204:
URL: https://github.com/apache/arrow/issues/50204
### Describe the bug, including details regarding any error messages, version, and platform.
The following new ad-hoc test:
```
TEST_F(S3OptionsTest, MakeUri) {
S3Options options;
options.ConfigureAccessKey("minio", "miniopass");
options.region = "us-east-1";
ASSERT_OK_AND_ASSIGN(auto fs, S3FileSystem::Make(options));
ASSERT_OK_AND_ASSIGN(auto uri, fs->MakeUri("/bucket/somedir/subdir/subfile"));
EXPECT_EQ(uri,
"s3://minio:miniopass@bucket/somedir/subdir/subfile"
"?region=us-east-1&scheme=https&endpoint_override="
"&allow_bucket_creation=0&allow_bucket_deletion=0");
}
```
fails on Windows MinGW because the bucket is dropped from the URL. I tested it in isolation on this PR:
- https://github.com/raulcd/arrow/pull/98
And the failure
```
[ RUN ] S3OptionsTest.MakeUri
D:/a/arrow/arrow/cpp/src/arrow/filesystem/s3fs_test.cc:1747: Failure
Expected equality of these values:
uri
Which is: "***somedir/subdir/subfile?region=us-east-1&scheme=https&endpoint_override=&allow_bucket_creation=0&allow_bucket_deletion=0"
"***bucket/somedir/subdir/subfile" "?region=us-east-1&scheme=https&endpoint_override=" "&allow_bucket_creation=0&allow_bucket_deletion=0"
Which is: "***bucket/somedir/subdir/subfile?region=us-east-1&scheme=https&endpoint_override=&allow_bucket_creation=0&allow_bucket_deletion=0"
[ FAILED ] S3OptionsTest.MakeUri (0 ms)
```
This is because the manual path parsing doesn't take Windows paths into account:
https://github.com/apache/arrow/blob/546d42c71a467c3741df2d6ececad966fc66bf4c/cpp/src/arrow/filesystem/s3fs.cc#L3051-L3061
I found out when testing our `arrow-s3fs-module-test` on all platforms not only on Linux where we have a similar test. This is a pre-existing bug.
Seems to be related to `util::UriFromAbsolutePath` but haven't been able to pin down the problem due to difficulty testing MinGW.
### Component(s)
C++
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] S3FileSystem::MakeUri drops bucket from path [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd closed issue #50204: [C++] S3FileSystem::MakeUri drops bucket from path
URL: https://github.com/apache/arrow/issues/50204
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] S3FileSystem::MakeUri drops bucket from path [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on issue #50204:
URL: https://github.com/apache/arrow/issues/50204#issuecomment-4739058671
Issue resolved by pull request 50205
https://github.com/apache/arrow/pull/50205
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org