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

Purging and getting instances with DurableTaskClient in dotnet-isolated runtime #372

Open
talhanaveedcoop opened this issue Apr 3, 2024 · 3 comments
Labels
P1 Priority 1

Comments

@talhanaveedcoop
Copy link

I am using the Durable task client (Microsoft.DurableTask.Client.DurableTaskClient) in dotnet isolated runtime. I want to purge instances of durable functions that have completed or failed and also I want to see how many instances are in running state. For this I am using the following code
image

image

Both there statements were working with Azure storage but they are not working with netherite. I get the following exception saying that the action is not supported when I try to purge
image

and I get a GRPC exception when I try to fetch all instances.
image

are these actions not supported for netherite and dotnet isolated?

@dunxbc
Copy link

dunxbc commented Apr 11, 2024

I've encountered this issue as well. Rolling back Microsoft.Azure.Functions.Worker.Extensions.DurableTask to 1.1.0 fixes the issue, it appears to be a regression in v1.1.2 of that package.

@talhanaveedcoop
Copy link
Author

talhanaveedcoop commented Apr 11, 2024

@dunxbc Rolling back to 1.1.0 solves the purging issue but there is still an issue with get instance states. The code is as follows

var instances = await client.GetAllInstancesAsync(new OrchestrationQuery
{ 
    CreatedFrom = DateTimeOffset.MinValue,
    CreatedTo = DateTimeOffset.Now,
    Statuses = new List<OrchestrationRuntimeStatus>
{
    OrchestrationRuntimeStatus.Running,
    OrchestrationRuntimeStatus.Pending,
}
}).ToListAsync();

But I get the following grpc exception

image

[14:13:03 ERR] Error in bong trigger: Status(StatusCode="Unknown", Detail="Exception was thrown by handler."), Message: Status(StatusCode="Unknown", Detail="Exception was thrown by handler."), InnerException: null
[2024-04-11T12:13:03.926Z] Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="Exception was thrown by handler.")
[2024-04-11T12:13:03.928Z]    at Microsoft.DurableTask.Client.Grpc.GrpcDurableTaskClient.<>c__DisplayClass18_0.<<GetAllInstancesAsync>b__0>d.MoveNext()
[2024-04-11T12:13:03.929Z] --- End of stack trace from previous location ---
[2024-04-11T12:13:03.930Z]    at Microsoft.DurableTask.Pageable.FuncAsyncPageable`1.AsPagesCore(String continuationToken, Nullable`1 pageSizeHint, CancellationToken cancellation)+MoveNext()
[2024-04-11T12:13:03.931Z]    at Microsoft.DurableTask.Pageable.FuncAsyncPageable`1.AsPagesCore(String continuationToken, Nullable`1 pageSizeHint, CancellationToken cancellation)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
[2024-04-11T12:13:03.932Z]    at Microsoft.DurableTask.AsyncPageable`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
[2024-04-11T12:13:03.933Z]    at Microsoft.DurableTask.AsyncPageable`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
[2024-04-11T12:13:03.935Z]    at Microsoft.DurableTask.AsyncPageable`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
[2024-04-11T12:13:03.935Z]    at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
[2024-04-11T12:13:03.937Z]    at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36

@davidmrdavid
Copy link
Member

This may be a duplicate of: microsoft/durabletask-dotnet#282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Priority 1
Projects
None yet
Development

No branches or pull requests

4 participants