Conversation
58d944a to
38a7629
Compare
|
AI audit note: This review comment was generated by AI ( Audit update for PR #1537 after the latest branch update: Confirmed defectsNo confirmed defects in reviewed scope. Coverage summaryScope reviewed: the updated |
|
@ianton-ru , u are probably addressing this one too #1516 as part of this PR. |
|
Test |
|
Issue was introduced in #1092. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b51668512f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| uri_str = uri_; | ||
|
|
||
| uri = Poco::URI(uri_str); | ||
| uri = Poco::URI(uri_str, enable_url_encoding); |
There was a problem hiding this comment.
Pass
enable_url_encoding through the wildcard ? reparse
The new enable_url_encoding plumbing is incomplete for URIs that contain a literal ? in the key. S3::URI still reparses those inputs via Poco::URI(uri_with_question_mark_encode) with the default encoding mode, and the existing gtest at src/IO/tests/gtest_s3_uri.cpp:29-33 shows that non-versionId ? segments are intentionally treated as part of key. In a path such as .../a%2Fb?marker, callers from resolveObjectStorageForPath(..., enable_url_encoding=false) will still decode %2F back to / after this second parse, so absolute metadata paths that rely on preserved percent-encoding continue to resolve the wrong object.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This methos is called not with any URL, but only with path in S3 or Azure storage. Question mark should be encoded in S3 object name https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html as well as in Azure https://learn.microsoft.com/en-us/azure/devops/organizations/settings/naming-restrictions?view=azure-devops&tabs=git.
@subkanthi Looks like your solution gives the same result, and more elegant. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e485a91f45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/Storages/ObjectStorage/Utils.cpp
Outdated
| S3::URI s3_uri(normalized_path); | ||
|
|
||
| std::string key_to_use = s3_uri.key; | ||
| std::string key_to_use = target_decomposed.key; |
There was a problem hiding this comment.
Preserve parsed S3 key for path-style URLs
Using target_decomposed.key here regresses path-style S3 HTTP(S) URIs (for example, https://s3.amazonaws.com/<bucket>/<key>): SchemeAuthorityKey keeps bucket/<key> in key, while s3_uri has already split bucket and object key correctly. The matching logic still uses s3_uri for bucket/endpoint checks, so when a storage match is found we now return a key with an extra bucket prefix, which makes object lookups fail with missing-file errors for those URLs.
Useful? React with 👍 / 👎.
This reverts commit ddd34ac.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Solved #1536
Fix incorrect encoding special characters in S3 paths.
Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: