{{ message }}
Repository navigation
fix(storage): treat ConstructReference keys as literal path segments - #8195
Open
spicysharkco wants to merge 1 commit into
Open
spicysharkco wants to merge 1 commit into
spicysharkco wants to merge 1 commit into
Conversation
The nested keys were parsed as a URL, so a key with '#' or '?' lost everything from that character on once the reference was split into a storage key, a stray '%' made the call fail, and a colon in the first key was read as a scheme. Build the relative path from the keys as-is. Signed-off-by: spicysharkco <321699413+spicysharkco@users.noreply.github.com>
This branch has not been deployed
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.

Why are the changes needed?
ConstructReferenceparses the joined keys as a URL. In an object name,#or?then cuts the key once the reference is split, a lone%fails the call, and a colon in the first key reads as a scheme.A directory output with
a#1.csvanda#2.csvsilently uploads both toraw/x/a.100%.csvmakes the call return:What changes were proposed in this pull request?
The keys now form a literal relative path. The returned reference escapes such characters (
a%231.csv), and a name that already holds%XX, such asa%20b.csv, was decoded before and now stays literal; no caller escapes its keys. Two ioutils error tests now use an invalid base prefix instead of a shard prefix.How was this patch tested?
Subtests in
TestUrlPathConstructor_ConstructReferencesplit a reference built froma#b.csv,what?.txt,100%.csv,50%25.csvandt:1.csvand compare the key with the name. They replace thekey1%error case, fail without the change and pass with it.Labels
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Stack
Docs link