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.51k stars 290 forks source link

In `PurgeInstancesFilter`, can `CreatedFrom` be null while `CreatedTo` is not null? #919

Open jjshao-ms opened 1 year ago

jjshao-ms commented 1 year ago

In this constructor-system-nullable((system-datetimeoffset))-system-collections-generic-ienumerable((microsoft-durabletask-client-orchestrationruntimestatus)))), we have both CreatedFrom and CreatedTo nullable, however, when I create one with new PurgeInstancesFilter(null, createdTimeTo, runtimeStatus), and call PurgeAllInstancesAsync with the created option, I got an exception. I know I can avoid this by using DateTimeOffset.MinValue but I would expect null to be equivalent to MinValue.

Looking around, the following code looks suspicious to me: