Azure / durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
Apache License 2.0
1.47k stars 287 forks source link

PurgeInstanceHistoryAsync on local azure storage not working. #745

Open Mohakane opened 2 years ago

Mohakane commented 2 years ago

Hi,

Description When we try to purge the instances history on local azure storage, using the PurgeInstanceHistoryAsync(DateTime createdTimeFrom, DateTime? createdTimeTo, IEnumerable runtimeStatus) we receive an exception "BadRequest". we are not able to find out what is wrong.

Expected behavior We expect that the records on the instance and the history table will be deleted for the specified range date and runtime status.

Actual behavior the function return an exception with BadRequest message .

App Details Microsoft.Azure.Functions.Extensions v1.1.0 Microsoft.Azure.WebJobs.Extensions.DurableTask v2.7.2 Azurite emulator for local Azure Storage Programming language used: .NET (C#) .NET 6.0

davidmrdavid commented 2 years ago

Hi @Mohakane,

Is this an issue for Durable Functions or durableTask? Trying to determine whether to move this issue to the Durable Functions Extension repo, as you're currently in the durableTask repo instead.

Mohakane commented 2 years ago

hi @davidmrdavid,

This is an issue for durableTask.

davidmrdavid commented 2 years ago

Thanks for clarifying, @Mohakane.

Would it be possible for you to provide us with a reproducer project? That would help us get to the bottom of this

Mohakane commented 2 years ago

Hello @davidmrdavid

you can find attached a reproducer project. you need to run azurite too.

DtfChunkTests.zip

davidmrdavid commented 2 years ago

Thanks @Mohakane.

I ran your project and didn't encounter an error. This is what I see on my terminal: deleted2

and here's the run-time value I received in result

deleted

Is this different from what you're seeing? If it is, could you please post a few screenshots of what you're getting? Thanks!

Mohakane commented 2 years ago

Hello @davidmrdavid ,

when I run the project using azurite emulator we get a status code 400 (Bad request).

You can see the exception in the picture below.

instance creation instanceCreation

purge history exception innerException

console logs

console

davidmrdavid commented 1 year ago

Thanks @Mohakane, that's indeed a strange result. @amdeel - any chance you could take a look at this? Not certain how to proceed with these differing results.

Mohakane commented 1 year ago

Hello @davidmrdavid

Please find below the exception using a try Catch.

RequestInformationException

bhugot commented 1 year ago

Hello it s a problem with azurite. I need to try it but maybe next version is fixing that. I have fixed some error in actual version but there are still some.

davidmrdavid commented 1 year ago

Thanks @bhugot. Just to confirm - are you saying that this will be fixed in an upcoming version of Azurite?