AspNetCore.Diagnostics.HealthChecks icon indicating copy to clipboard operation
AspNetCore.Diagnostics.HealthChecks copied to clipboard

Support to the Azure table storage through Cosmos

Open DOMZE opened this issue 2 years ago • 0 comments

The AddAzureTable extension method doesn't support CosmosDB API as the TableRestClient.GetAccessPolicyAsync() is not supported by Cosmos

Exception is:

at Azure.Data.Tables.TableRestClient.GetAccessPolicyAsync(String table, Nullable`1 timeout, CancellationToken cancellationToken)
at Azure.Data.Tables.TableClient.GetAccessPoliciesAsync(CancellationToken cancellationToken)
at HealthChecks.CosmosDb.TableServiceHealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken) in /_/src/HealthChecks.CosmosDb/TableServiceHealthCheck.cs:line 46

I believe the AddAzureTable should take in consideration if it's a cosmos resource or storage account if you want to continue using GetAccessPolicyAsync or perhaps not use GetAccessPolicyAsync and use something else.

DOMZE avatar Mar 16 '22 19:03 DOMZE