Azurite: Aspire default table HealthCheck fails with 400 bad request

Which service(blob, file, queue, table) does this issue concern?

Table

Which version of the Azurite was used?

3.31.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

What’s the Node.js version?

NA – Came w/ docker image

What problem was encountered?

{Azure.RequestFailedException: The query condition specified in the request is invalid. RequestId:c4e94892-fb90-4649-82d3-9598e3e6200a Time:2024-08-09T14:10:35.536Z Status: 400 (Bad Request) ErrorCode: InvalidInput

Content: {“odata.error”:{“code”:“InvalidInput”,“message”:{“lang”:“en-US”,“value”:“The query condition specified in the request is invalid.\nRequestId:c4e94892-fb90-4649-82d3-9598e3e6200a\nTime:2024-08-09T14:10:35.536Z”}}}

Headers: Server: Azurite-Table/3.31.0 x-ms-error-code: REDACTED x-ms-request-id: c4e94892-fb90-4649-82d3-9598e3e6200a x-ms-version: REDACTED Date: Fri, 09 Aug 2024 14:10:35 GMT Connection: keep-alive Keep-Alive: REDACTED Transfer-Encoding: chunked Content-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8

at Azure.Data.Tables.TableRestClient.QueryAsync(String nextTableName, QueryOptions queryOptions, CancellationToken cancellationToken) at Azure.Data.Tables.TableServiceClient.<>c__DisplayClass34_0.<<QueryAsync>b__0>d.MoveNext() -…

More stack:

" at Azure.Data.Tables.TableRestClient.<QueryAsync>d__8.MoveNext()\r\n at Azure.Data.Tables.TableServiceClient.<>c__DisplayClass34_0.<<QueryAsync>b__0>d.MoveNext()\r\n at Azure.Core.PageableHelpers.FuncAsyncPageable1.<AsPages>d__4.MoveNext()\r\n at Azure.Core.PageableHelpers.FuncAsyncPageable1.<AsPages>d__4.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)\r\n at Azure.AsyncPageable1.<GetAsyncEnumerator>d__6.MoveNext()\r\n at Azure.AsyncPageable1.<GetAsyncEnumerator>d__6.MoveNext()\r\n at Azure.AsyncPageable`1.<GetAsyncEnumerator>d__6.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)\r\n at HealthChecks.Azure.Data.Tables.AzureTableServiceHealthCheck.<CheckHealthAsync>d__3.MoveNext()"

Health check source code:

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.Azure.Data.Tables/AzureTableServiceHealthCheck.cs

Steps to reproduce the issue?

After switching to Azurite, using the default health checker that comes with the Aspire component for adding azure table storage, the health check is receiving a 400 bad request.

  1. Create a new Aspire app
  2. Add azurite to apphost
// Add Azure Storage
var storage = builder.AddAzureStorage("storage")
    .RunAsEmulator(c => c.WithImageTag("3.31.0").WithDataVolume();
);
var yourComponent = storage.AddTables("yourcomponent");
  1. Add a client app which loads the component, then enable health checks
builder.AddKeyedAzureTableClient("yourcomponent");

Have you found a mitigation/solution?

Not yet

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @blueww I was looking at C# health check library. https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.Azure.Data.Tables/AzureTableServiceHealthCheck.cs

Image

We have the same filter query for tables and table entities.