You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/07 17:08:44 UTC
[GitHub] [arrow-rs] tustvold opened a new pull request, #2354: Fix Copy from percent-encoded path (#2353)
tustvold opened a new pull request, #2354:
URL: https://github.com/apache/arrow-rs/pull/2354
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #2353
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
I added this test in #2352 and realised it was failing for the existing AWS implementation, and Azure. This fixes the behaviour
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
No
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please add the `breaking change` label.
-->
--
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
[GitHub] [arrow-rs] viirya commented on a diff in pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#discussion_r939701199
##########
object_store/src/azure.rs:
##########
@@ -470,14 +470,15 @@ impl ObjectStore for MicrosoftAzure {
impl MicrosoftAzure {
/// helper function to create a source url for copy function
- fn get_copy_from_url(&self, from: &Path) -> Result<reqwest::Url> {
- Ok(reqwest::Url::parse(&format!(
- "{}/{}/{}",
- &self.blob_base_url, self.container_name, from
- ))
- .context(UnableToParseUrlSnafu {
- container: &self.container_name,
- })?)
+ fn get_copy_from_url(&self, from: &Path) -> Result<Url> {
+ let mut url =
+ Url::parse(&format!("{}/{}", &self.blob_base_url, self.container_name))
+ .context(UnableToParseUrlSnafu {
+ container: &self.container_name,
+ })?;
+
+ url.path_segments_mut().unwrap().extend(from.parts());
Review Comment:
Oh, I see. Thanks for pointing to the doc. 😄
--
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
[GitHub] [arrow-rs] tustvold merged pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
tustvold merged PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354
--
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
[GitHub] [arrow-rs] ursabot commented on pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#issuecomment-1207457199
Benchmark runs are scheduled for baseline = 5676c6e378ab638efffc1789116d1e535ea88d36 and contender = a2de36335c6fccb1e365c9032222e0d553ee5a55. a2de36335c6fccb1e365c9032222e0d553ee5a55 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/f400c30f78f042b7ae0033a5c5566d79...199943ab288d42d39559e7479ce993d4/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/fa4193be32104271bddeb8ffe19914c7...3ae99fe02ce747d69c748002a7fd79d6/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c1fc7765396e47bd89ff5c74169fc862...5b486c9d860545eeba8c7d6cee3f4cc3/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/2d80ccf1e789458e8bba6ed41b0c19b5...4e58231e0ff244a5b329864759213301/)
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
--
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
[GitHub] [arrow-rs] tustvold commented on a diff in pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#discussion_r939700683
##########
object_store/src/azure.rs:
##########
@@ -470,14 +470,15 @@ impl ObjectStore for MicrosoftAzure {
impl MicrosoftAzure {
/// helper function to create a source url for copy function
- fn get_copy_from_url(&self, from: &Path) -> Result<reqwest::Url> {
- Ok(reqwest::Url::parse(&format!(
- "{}/{}/{}",
- &self.blob_base_url, self.container_name, from
- ))
- .context(UnableToParseUrlSnafu {
- container: &self.container_name,
- })?)
+ fn get_copy_from_url(&self, from: &Path) -> Result<Url> {
+ let mut url =
+ Url::parse(&format!("{}/{}", &self.blob_base_url, self.container_name))
+ .context(UnableToParseUrlSnafu {
+ container: &self.container_name,
+ })?;
+
+ url.path_segments_mut().unwrap().extend(from.parts());
Review Comment:
That's what [`extend`](https://docs.rs/url/latest/url/struct.PathSegmentsMut.html#method.extend) does, and what this PR is changing. Sorry I should have called this out :smile:
--
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
[GitHub] [arrow-rs] viirya commented on a diff in pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#discussion_r939701199
##########
object_store/src/azure.rs:
##########
@@ -470,14 +470,15 @@ impl ObjectStore for MicrosoftAzure {
impl MicrosoftAzure {
/// helper function to create a source url for copy function
- fn get_copy_from_url(&self, from: &Path) -> Result<reqwest::Url> {
- Ok(reqwest::Url::parse(&format!(
- "{}/{}/{}",
- &self.blob_base_url, self.container_name, from
- ))
- .context(UnableToParseUrlSnafu {
- container: &self.container_name,
- })?)
+ fn get_copy_from_url(&self, from: &Path) -> Result<Url> {
+ let mut url =
+ Url::parse(&format!("{}/{}", &self.blob_base_url, self.container_name))
+ .context(UnableToParseUrlSnafu {
+ container: &self.container_name,
+ })?;
+
+ url.path_segments_mut().unwrap().extend(from.parts());
Review Comment:
Oh, I see. Thanks for pointing to the doc. I thought it just simply extend the content. 😄
--
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
[GitHub] [arrow-rs] viirya commented on a diff in pull request #2354: Fix Copy from percent-encoded path (#2353)
Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #2354:
URL: https://github.com/apache/arrow-rs/pull/2354#discussion_r939698595
##########
object_store/src/azure.rs:
##########
@@ -470,14 +470,15 @@ impl ObjectStore for MicrosoftAzure {
impl MicrosoftAzure {
/// helper function to create a source url for copy function
- fn get_copy_from_url(&self, from: &Path) -> Result<reqwest::Url> {
- Ok(reqwest::Url::parse(&format!(
- "{}/{}/{}",
- &self.blob_base_url, self.container_name, from
- ))
- .context(UnableToParseUrlSnafu {
- container: &self.container_name,
- })?)
+ fn get_copy_from_url(&self, from: &Path) -> Result<Url> {
+ let mut url =
+ Url::parse(&format!("{}/{}", &self.blob_base_url, self.container_name))
+ .context(UnableToParseUrlSnafu {
+ container: &self.container_name,
+ })?;
+
+ url.path_segments_mut().unwrap().extend(from.parts());
Review Comment:
Don't need to encode the path here?
--
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