Skip to content
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

[BUG] BlobBaseClient.GetProperties() returned "IsLatestVersion" is false, even the blob is current version #21402

Closed
blueww opened this issue May 27, 2021 · 1 comment · Fixed by #21550
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@blueww
Copy link
Member

blueww commented May 27, 2021

Describe the bug
"Azure.Storage.Blobs 12.9.0-beta.4" has a regression.
I don't meet this on "Azure.Storage.Blobs 12.8.0"

BlobBaseClient.GetProperties() returned "IsLatestVersion" is false, even the blob is current version.

Expected behavior
BlobBaseClient.GetProperties() returned "IsLatestVersion" is true, when the blob is current version.

Actual behavior (include Exception or Stack Trace)
BlobBaseClient.GetProperties() returned "IsLatestVersion" is false, even the blob is current version.

In my test, following responds return from server, note it contains x-ms-is-current-version: true:

HEAD https://[accountname].blob.core.windows.net/container637577201881923669/bb.txt HTTP/1.1
x-ms-version: 2020-08-04
Accept: application/xml
x-ms-client-request-id: f6baaead-8d4a-4496-a1e5-141f47894812
x-ms-return-client-request-id: true
User-Agent: azsdk-net-Storage.Blobs/12.9.0-beta.4 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )
x-ms-date: Thu, 27 May 2021 06:46:33 GMT
Authorization: SharedKey [accountname]:[hidden]
Host: accountname.blob.core.windows.net
Connection: Keep-Alive


HTTP/1.1 200 OK
Content-Length: 2097152
Content-Type: application/octet-stream
Content-MD5: bqUxW6Bsbx3/sdrQQJXong==
Last-Modified: Thu, 27 May 2021 05:50:09 GMT
Accept-Ranges: bytes
ETag: "0x8D920D3495E6293"
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 92dc03f4-801e-0093-41c4-5201c8000000
x-ms-client-request-id: f6baaead-8d4a-4496-a1e5-141f47894812
x-ms-version: 2020-08-04
x-ms-version-id: 2021-05-27T05:50:09.0766526Z
x-ms-is-current-version: true
x-ms-creation-time: Thu, 27 May 2021 05:50:08 GMT
x-ms-lease-status: unlocked
x-ms-lease-state: available
x-ms-blob-type: BlockBlob
x-ms-copy-id: 131d6e7e-344c-4db2-aef7-949ff3d99aee
x-ms-copy-source: [hidden]
x-ms-copy-status: success
x-ms-copy-progress: 2097152/2097152
x-ms-copy-completion-time: Thu, 27 May 2021 05:50:09 GMT
x-ms-server-encrypted: true
x-ms-access-tier: Hot
x-ms-access-tier-inferred: true
x-ms-last-access-time: Thu, 27 May 2021 05:50:09 GMT
Date: Thu, 27 May 2021 06:46:34 GMT

But "IsLatestVersion" is false in SDK ourput BlobProperties.
image

To Reproduce

Run following code on an account enabled versioning.
(Need fill the correct blob Uri , account name/key before run it.)

            BlobBaseClient blobclient = new BlobBaseClient(new Uri("https://accountname.blob.core.windows.net/containername/blobname"), 
                new StorageSharedKeyCredential(accountname, key));
            BlobProperties blobProperties =  blobclient.GetProperties().Value;
            Console.WriteLine(blobProperties.IsLatestVersion);

Environment:

  • Name and version of the Library package used:
    "Azure.Storage.Blobs 12.9.0-beta.4"
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
.NET Core SDK (reflecting any global.json):
 Version:   2.2.108
 Commit:    33ed5b90ce

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.108\

Host (useful for support):
  Version: 2.2.6
  Commit:  7dac9b1b51

.NET Core SDKs installed:
  2.2.108 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
  • IDE and version : [e.g. Visual Studio 16.3]
    VS 15.7.4
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 27, 2021
@blueww blueww added the Storage Storage Service (Queues, Blobs, Files) label May 27, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 27, 2021
@blueww blueww added the Client This issue points to a problem in the data-plane of the library. label May 27, 2021
@blueww
Copy link
Member Author

blueww commented May 28, 2021

@seanmcc-msft
Would you please help to look at this issue?

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-net that referenced this issue Nov 24, 2022
Review request for Microsoft.ContainerService to add version 2022-10-02-preview (Azure#21439)

* Adds base for updating Microsoft.ContainerService from version preview/2022-09-02-preview to version 2022-10-02-preview

* Updates readme

* Updates API version in new specs and examples

* Pmiller/nodeosupgradechannel (Azure#21326)

* missed working comment

* matthew comments

* unpatched is a word

* Add MaintenanceWindow into MaintenanceConfigurationProperties (Azure#21337)

* Add MaintenanceWindow into MaintenanceConfigurationProperties

* Fx PrettierCheck

* Fix ARM ID format for samples (Azure#21402)

* Fix Swagger Model Validation for the 2022-10-02-preview dev branch of container service (Azure#21373)

* fix API version

* fix INVALID_FORMAT byte

* fix INVALID_FORMAT arm-id

* fix missing resource id

* fix LRO_RESPONSE_HEADER

* Update readmes for the 2022-10-02-preview dev branch of container service (Azure#21366)

* update readmes

* remove fleets

* Updating abort apis response to make it long running  (Azure#21362)

* Updating response abort abort apis

* Updating abort AP and MC examples

* Changes per CI checks

* Adding x-ms-long-running-operation-options

* Adding location header

Co-authored-by: InduSridhar <[email protected]>

* fix 202 location header

* fix ProvisioningState validation

* add x-ms-long-running-operation-options

* fix ResourceNameRestriction

* Fix abort location url in example (Azure#21446)

* Updating response abort abort apis

* Updating abort AP and MC examples

* Changes per CI checks

* Adding x-ms-long-running-operation-options

* Adding location header

* Fixing location url in abort examples

Co-authored-by: InduSridhar <[email protected]>

* Abort api response fix (Azure#21559)

* Updating response abort abort apis

* Updating abort AP and MC examples

* Changes per CI checks

* Adding x-ms-long-running-operation-options

* Adding location header

* Fixing location url in abort examples

* Fixing headers and body for abort response

* Linter fix

* Lint fix

* Updating managedclusters.json responses

Co-authored-by: InduSridhar <[email protected]>

* Node os upgrade desc fix (Azure#21636)

* Updating response abort abort apis

* Updating abort AP and MC examples

* Changes per CI checks

* Adding x-ms-long-running-operation-options

* Adding location header

* Fixing location url in abort examples

* Fixing headers and body for abort response

* Linter fix

* Lint fix

* Updating managedclusters.json responses

* Minor edit to node os upgrade description based on ARM review

Co-authored-by: InduSridhar <[email protected]>

Co-authored-by: Paul Miller <[email protected]>
Co-authored-by: Thalia Wang <[email protected]>
Co-authored-by: Matthew Christopher <[email protected]>
Co-authored-by: InduSridhar <[email protected]>
Co-authored-by: InduSridhar <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant