-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Leave Open] Fix metadata sorting issue #13753
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
40162ee
added sorting fix
tasherif-msft d122f4c
added test
tasherif-msft 2cc2afe
manually set the env var
tasherif-msft c9c822a
Merge branch 'master' into sorting-issue
tasherif-msft 8db56e0
changed setting
tasherif-msft e3e643d
removed hardcoded env setting
tasherif-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
146 changes: 146 additions & 0 deletions
146
...ests/recordings/test_blob_access_conditions.test_header_metadata_sort_in_upload_blob.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.5.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Sun, 13 Sep 2020 18:17:12 GMT | ||
x-ms-version: | ||
- '2019-12-12' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainerbd791bbe?restype=container | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
date: | ||
- Sun, 13 Sep 2020 18:17:12 GMT | ||
etag: | ||
- '"0x8D858113CD5E782"' | ||
last-modified: | ||
- Sun, 13 Sep 2020 18:17:13 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-version: | ||
- '2019-12-12' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: hello world | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '11' | ||
Content-Type: | ||
- application/octet-stream | ||
If-None-Match: | ||
- '*' | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.5.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-date: | ||
- Sun, 13 Sep 2020 18:17:13 GMT | ||
x-ms-version: | ||
- '2019-12-12' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainerbd791bbe/blob1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
content-md5: | ||
- XrY7u+Ae7tCTyyK7j1rNww== | ||
date: | ||
- Sun, 13 Sep 2020 18:17:12 GMT | ||
etag: | ||
- '"0x8D858113CE74816"' | ||
last-modified: | ||
- Sun, 13 Sep 2020 18:17:13 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-content-crc64: | ||
- vo7q9sPVKY0= | ||
x-ms-request-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2019-12-12' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: hello world | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '11' | ||
Content-Type: | ||
- application/octet-stream | ||
If-Modified-Since: | ||
- Sun, 13 Sep 2020 18:02:13 GMT | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.5.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-date: | ||
- Sun, 13 Sep 2020 18:17:13 GMT | ||
x-ms-meta-_a_: | ||
- d | ||
x-ms-meta-i0: | ||
- a | ||
x-ms-meta-i_: | ||
- a | ||
x-ms-version: | ||
- '2019-12-12' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainerbd791bbe/blob1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
content-md5: | ||
- XrY7u+Ae7tCTyyK7j1rNww== | ||
date: | ||
- Sun, 13 Sep 2020 18:17:12 GMT | ||
etag: | ||
- '"0x8D858113CFBE550"' | ||
last-modified: | ||
- Sun, 13 Sep 2020 18:17:13 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-content-crc64: | ||
- vo7q9sPVKY0= | ||
x-ms-request-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2019-12-12' | ||
status: | ||
code: 201 | ||
message: Created | ||
version: 1 |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a global setting ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. I've been looking into ways to create some form of a locale object to sort based on without having to set globally. So far, my findings have been: I can either run a child process and set the locale in it or set the locale right before my sort then undo it right after my sort (by resetting to the original locale).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should explore other ways to get sorting right. We shouldn't be setting globals like this as it may interfere with customers application.
I'm not sure if setting and unsetting is good option either. That might lead to race conditions if there's some parallel work being done meanwhile.