Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.48k stars 4.81k forks source link

[Test] [Storage] Flakey test FindBlobsByTagAsync_AccountSas(All) #33552

Open amnguye opened 1 year ago

amnguye commented 1 year ago

Library name and version

Azure.Storage.Blob

Query/Question

Definitely a flakey test cause I've only seen it fail every 10-20 live test runs.

Error

Expected: not null
But was:  null

Stack Trace:

at Azure.Storage.Blobs.Test.ServiceClientTests.FindBlobsByTagAsync_AccountSas(AccountSasPermissions accountSasPermissions) in /mnt/vss/_work/1/s/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs:line 752
   at Azure.Storage.Blobs.Test.ServiceClientTests.FindBlobsByTagAsync_AccountSas(AccountSasPermissions accountSasPermissions) in /mnt/vss/_work/1/s/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs:line 752
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)

1)    at Azure.Storage.Blobs.Test.ServiceClientTests.FindBlobsByTagAsync_AccountSas(AccountSasPermissions accountSasPermissions) in /mnt/vss/_work/1/s/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs:line 752

Log Output

[19:01:53.999] Request c87fd76c-85a3-4914-9d1e-70febcb1fdc2
  method: PUT
  uri: https://t757bdec6910f4b26prim.blob.core.windows.net/test-container-c95e60d1-2f1f-4c5b-bcbb-6914dd9bf8cf?restype=container
  headers: 
    x-ms-blob-public-access:container
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:c87fd76c-85a3-4914-9d1e-70febcb1fdc2
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230117.2 (.NET 6.0.13; Linux 5.15.0-1023-azure #29~20.04.1-Ubuntu SMP Wed Oct 26 19:18:25 UTC 2022)
    x-ms-date:Tue, 17 Jan 2023 19:01:53 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[19:01:54.073] Response c87fd76c-85a3-4914-9d1e-70febcb1fdc2
  status: 201
  reasonPhrase: Created
  headers: 
    ETag:"0x8DAF8BD4C5F7C8A"
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:db177387-b01e-0004-40a6-2a1c85000000
    x-ms-client-request-id:c87fd76c-85a3-4914-9d1e-70febcb1fdc2
    x-ms-version:2021-12-02
    Date:Tue, 17 Jan 2023 19:01:53 GMT
    Content-Length:0
    Last-Modified:Tue, 17 Jan 2023 19:01:54 GMT
  seconds: 0.074072944

[19:01:54.074] Request 4818aa8c-a824-419c-8eca-c7efead494a4
  method: PUT
  uri: https://t757bdec6910f4b26prim.blob.core.windows.net/test-container-c95e60d1-2f1f-4c5b-bcbb-6914dd9bf8cf/test-blob-fb1f9e9a-a643-4ada-864a-114c0cdb56fe
  headers: 
    x-ms-blob-type:AppendBlob
    x-ms-version:2021-12-02
    x-ms-tags:REDACTED
    Accept:application/xml
    x-ms-client-request-id:4818aa8c-a824-419c-8eca-c7efead494a4
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230117.2 (.NET 6.0.13; Linux 5.15.0-1023-azure #29~20.04.1-Ubuntu SMP Wed Oct 26 19:18:25 UTC 2022)
    x-ms-date:Tue, 17 Jan 2023 19:01:54 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[19:01:54.092] Response 4818aa8c-a824-419c-8eca-c7efead494a4
  status: 201
  reasonPhrase: Created
  headers: 
    ETag:"0x8DAF8BD4C6A19FA"
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:db1773d5-b01e-0004-7aa6-2a1c85000000
    x-ms-client-request-id:4818aa8c-a824-419c-8eca-c7efead494a4
    x-ms-version:2021-12-02
    x-ms-request-server-encrypted:true
    x-ms-version-id:REDACTED
    Date:Tue, 17 Jan 2023 19:01:53 GMT
    Content-Length:0
    Last-Modified:Tue, 17 Jan 2023 19:01:54 GMT
  seconds: 0.01871304

[19:01:56.095] Request 31096597-1f7f-452e-933c-689e711512fc
  method: GET
  uri: https://t757bdec6910f4b26prim.blob.core.windows.net/?sv=2021-12-02&ss=b&srt=sco&st=2023-01-17T18%3A01%3A56Z&se=2023-01-17T20%3A01%3A56Z&sp=rwdxylacuptfi&sig=REDACTED&comp=blobs&where=REDACTED
  headers: 
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:31096597-1f7f-452e-933c-689e711512fc
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230117.2 (.NET 6.0.13; Linux 5.15.0-1023-azure #29~20.04.1-Ubuntu SMP Wed Oct 26 19:18:25 UTC 2022)
  clientAssembly: Azure.Storage.Blobs

[19:01:56.103] Response 31096597-1f7f-452e-933c-689e711512fc
  status: 200
  reasonPhrase: OK
  headers: 
    Transfer-Encoding:chunked
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:db177ecb-b01e-0004-0da6-2a1c85000000
    x-ms-version:2021-12-02
    x-ms-client-request-id:31096597-1f7f-452e-933c-689e711512fc
    Date:Tue, 17 Jan 2023 19:01:55 GMT
    Content-Type:application/xml
  seconds: 0.007591978

[19:01:56.118] Request dd12dc4e-a82b-4677-bdba-2d4117ef5151
  method: DELETE
  uri: https://t757bdec6910f4b26prim.blob.core.windows.net/test-container-c95e60d1-2f1f-4c5b-bcbb-6914dd9bf8cf?restype=container
  headers: 
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:dd12dc4e-a82b-4677-bdba-2d4117ef5151
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230117.2 (.NET 6.0.13; Linux 5.15.0-1023-azure #29~20.04.1-Ubuntu SMP Wed Oct 26 19:18:25 UTC 2022)
    x-ms-date:Tue, 17 Jan 2023 19:01:56 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[19:01:56.13] Response dd12dc4e-a82b-4677-bdba-2d4117ef5151
  status: 202
  reasonPhrase: Accepted
  headers: 
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:db177ef0-b01e-0004-29a6-2a1c85000000
    x-ms-client-request-id:dd12dc4e-a82b-4677-bdba-2d4117ef5151
    x-ms-version:2021-12-02
    Date:Tue, 17 Jan 2023 19:01:55 GMT
    Content-Length:0
  seconds: 0.01145637

Environment

No response

amnguye commented 1 year ago

A different but related test failed with a different error.

TestName: FilterBlobsByTag

Error Message: System.NullReferenceException : Object reference not set to an instance of an object.

Stack Trace:

   at Azure.Storage.Blobs.Test.ContainerClientTests.FilterBlobsByTag() in D:\a\_work\1\s\sdk\storage\Azure.Storage.Blobs\tests\ContainerClientTests.cs:line 3779
   at Azure.Storage.Blobs.Test.ContainerClientTests.FilterBlobsByTag() in D:\a\_work\1\s\sdk\storage\Azure.Storage.Blobs\tests\ContainerClientTests.cs:line 3780
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)

Attachment outputs:

[13:09:32.564] Request 96605aa8-2a84-4bae-a1d0-8fff3498204f
  method: PUT
  uri: https://<name>.blob.core.windows.net/test-container-f25e49b7-03a7-4a5d-9215-b7d35019f7cb?restype=container
  headers: 
    x-ms-blob-public-access:container
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:96605aa8-2a84-4bae-a1d0-8fff3498204f
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230127.1 (.NET 7.0.1; Microsoft Windows 10.0.20348)
    x-ms-date:Fri, 27 Jan 2023 13:09:32 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[13:09:32.572] Response 96605aa8-2a84-4bae-a1d0-8fff3498204f
  status: 201
  reasonPhrase: Created
  headers: 
    ETag:"0x8DB0067BB37CFE7"
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:4428a453-601e-0012-4150-32b161000000
    x-ms-client-request-id:96605aa8-2a84-4bae-a1d0-8fff3498204f
    x-ms-version:2021-12-02
    Date:Fri, 27 Jan 2023 13:09:31 GMT
    Content-Length:0
    Last-Modified:Fri, 27 Jan 2023 13:09:32 GMT
  seconds: 0.0076559

[13:09:32.572] Request 44ec8495-3b09-4b46-9748-07c57b38bcda
  method: PUT
  uri: https://<name>.blob.core.windows.net/test-container-f25e49b7-03a7-4a5d-9215-b7d35019f7cb/test-blob-23c6d760-8962-426a-a028-12e245bb31ce
  headers: 
    x-ms-blob-type:AppendBlob
    x-ms-version:2021-12-02
    x-ms-tags:REDACTED
    Accept:application/xml
    x-ms-client-request-id:44ec8495-3b09-4b46-9748-07c57b38bcda
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230127.1 (.NET 7.0.1; Microsoft Windows 10.0.20348)
    x-ms-date:Fri, 27 Jan 2023 13:09:32 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[13:09:32.579] Response 44ec8495-3b09-4b46-9748-07c57b38bcda
  status: 201
  reasonPhrase: Created
  headers: 
    ETag:"0x8DB0067BB38BB07"
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:4428a46b-601e-0012-5550-32b161000000
    x-ms-client-request-id:44ec8495-3b09-4b46-9748-07c57b38bcda
    x-ms-version:2021-12-02
    x-ms-request-server-encrypted:true
    x-ms-version-id:REDACTED
    Date:Fri, 27 Jan 2023 13:09:31 GMT
    Content-Length:0
    Last-Modified:Fri, 27 Jan 2023 13:09:32 GMT
  seconds: 0.0072535

[13:09:34.566] Request 30a4d6c9-a7a5-4803-b494-f1aa2517d6d2
  method: GET
  uri: https://<name>.blob.core.windows.net/test-container-f25e49b7-03a7-4a5d-9215-b7d35019f7cb?restype=container&comp=blobs&where=REDACTED
  headers: 
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:30a4d6c9-a7a5-4803-b494-f1aa2517d6d2
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230127.1 (.NET 7.0.1; Microsoft Windows 10.0.20348)
    x-ms-date:Fri, 27 Jan 2023 13:09:34 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[13:09:34.571] Response 30a4d6c9-a7a5-4803-b494-f1aa2517d6d2
  status: 200
  reasonPhrase: OK
  headers: 
    Transfer-Encoding:chunked
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:4428b52d-601e-0012-0350-32b161000000
    x-ms-version:2021-12-02
    x-ms-client-request-id:30a4d6c9-a7a5-4803-b494-f1aa2517d6d2
    Date:Fri, 27 Jan 2023 13:09:33 GMT
    Content-Type:application/xml
  seconds: 0.0049792

[13:09:34.572] Request edf71796-e43e-4415-85f8-d460af71e3f8
  method: DELETE
  uri: https://<name>.blob.core.windows.net/test-container-f25e49b7-03a7-4a5d-9215-b7d35019f7cb?restype=container
  headers: 
    x-ms-version:2021-12-02
    Accept:application/xml
    x-ms-client-request-id:edf71796-e43e-4415-85f8-d460af71e3f8
    x-ms-return-client-request-id:true
    User-Agent:azsdk-net-Storage.Blobs/12.15.0-alpha.20230127.1 (.NET 7.0.1; Microsoft Windows 10.0.20348)
    x-ms-date:Fri, 27 Jan 2023 13:09:34 GMT
    Authorization:REDACTED
  clientAssembly: Azure.Storage.Blobs

[13:09:34.584] Response edf71796-e43e-4415-85f8-d460af71e3f8
  status: 202
  reasonPhrase: Accepted
  headers: 
    Server:Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id:4428b53f-601e-0012-1350-32b161000000
    x-ms-client-request-id:edf71796-e43e-4415-85f8-d460af71e3f8
    x-ms-version:2021-12-02
    Date:Fri, 27 Jan 2023 13:09:33 GMT
    Content-Length:0
  seconds: 0.0123813