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
Querying the state does not work in Azure Containers App #155
Comments
Also, I just added metadata but still have an error.
|
@sergiibielskyi can you share what your |
Sure, resource cosmosdbapp 'Microsoft.App/containerapps@2022-01-01-preview' = { |
Also, tested by adding apiVersion: 'dapr.io/v1alpha1' to properties but it was nothing changed |
Hey @ahmelsayed, any updates from your side? What I did wrong? |
The problem is still there even though the Container Apps is using dapr v1.7.3. I can't query Cosmos DB store when deploying to Azure container apps, while query cosmos db works fine when I self-host dapr on my machine with no issues. Other operations such as GET/PUT/Delete/Post are working fine in container apps with cosmos state store. This is the exception I'm receiving
My query is very simple, like the below
Here is my state store yaml used for azure container apps deployment
Here is my state store yaml used locally to test dapr on my machine
|
@ItalyPaleAle Can you help with this issue? |
@tjoudeh Thanks for the report. Can you confirm if while running in Container Apps you can connect to Cosmos DB? I understand that querying doesn't work, but are you able to perform operations to get or set a state? |
Thanks @ItalyPaleAle for reaching out, as I stated in my comment, all other operations such as GET by id, POST, DELETE, etc.. are working fine with no issues on container apps. Only query the collection is throwing this exception. Yet when running the app self hosted on my machine the query works fine with no issues, so I believe it's something related to container apps hosting. I'm using the latest .net core dapr sdks too. |
Thanks for confirming @tjoudeh . As you confirm that, I believe we have identified the root cause of the issue and are working on a fix. The issue in upstream Dapr is here: dapr/dapr#5008 I am working with @torosent and his team to understand how we can ship this to CApps as soon as feasible. |
Perfect, thank you so much, happy to early test this of there is a preview version which will be shipped soon, please consider looking into the order by part too as its not working on self hosted dapr application and most probably on CApps too 😀 |
Can you please open an issue on for that in http://github.com/dapr/components-contrib and we'll look into it :) |
Sure thing, will do on Sunday 👊 |
the issue is still there @ItalyPaleAle any updates or workarounds |
@akshat172 Yes, the rollout of the fix hasn't been completed yet. It may take another week or two. |
Ok Great thanks for the update. Will wait for the fix to be released. |
Hi @ruslany @ItalyPaleAle , Has this issue been resolved. |
I believe the updated version of Dapr should be available in all Azure regions now. If it’s still not working for you, can you please let us know? |
@ItalyPaleAle I deployed my code this morning, I was still getting that gRPC unimplemented error. |
You are right, I just checked and the fix hasn’t rolled out yet. It will be in Dapr version 1.8.4-msft-2 (you’re still running 1.8.4-msft-1). Checking with the release team what the status is. Sorry about that |
Hi, @ItalyPaleAle PLease let me know once it has been rolled out. |
No, it should “just work” once it’s been rolled out |
Hello @ItalyPaleAle Has this been rolled out now? Thank you. |
I tried it out right now on East US, and I can confirm that query API is working as expected on ACA with the latest dapr update. thanks @ItalyPaleAle & @torosent |
Hey, happy to hear that it should work. But after testing I see response 200 but without content in response. But if we are talking about executing the same piece of code locally, I do not see such a problem. What will be and how to trace that? My example is following below,
|
Hi, do we know this has been fixed entirely in all Azure regions? thanks |
Yes should be fixed in all regions |
Hi team,
I am trying to find the solution to how to get results from state storage by using a specific query, not just getting item by id. I found a good explanation here https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-state-query-api/. And I prepared method to use query state.
CancellationTokenSource source = new CancellationTokenSource();
CancellationToken cancellationToken = source.Token;
var queryResponse = await daprClient.QueryStateAsync(storeName, query, cancellationToken: cancellationToken);
Locally, it works. But when I try to publish that into the Azure Containers App I see 500 error.
I assume, probably Azure Containers App service doesn't have the right Dapr runtime but I can not prove it.
Any ideas?
App logs info below,
Dapr.DaprException: Query state operation failed: the Dapr endpointed indicated a failure.
See InnerException for details. ---> Grpc.Core.RpcException: Status(StatusCode="Unknown",
Detail="cannot proxy request: missing dapr-app-id metadata")
at Dapr.Client.DaprClientGrpc.QueryStateAsync[TValue](String storeName, String jsonQuery,
IReadOnlyDictionary2 metadata, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Dapr.Client.DaprClientGrpc.QueryStateAsync[TValue](String storeName, String jsonQuery, IReadOnlyDictionary2 metadata, CancellationToken cancellationToken)
at mart.cosmosdb.ObjectController.GetObjectsByQuery(String style)
in /cosmosdb/mart-api-cosmos-db/Controllers/ObjectController.cs:line 38
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.
TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper,
ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker. g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)
The text was updated successfully, but these errors were encountered: