You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it used to be working with pre 2.0.0 DTF version but now it throws an exception, later in stack, after the timer is created and when a task is picked up for execution:
message": TaskOrchestrationDispatcher-b16f0d531284437aa1371a4493157b75-0: Unhandled exception with work item '22d6a199b42b4ab2ba41c4fc69ac7071:1': System.NotSupportedException: DateTime 06/26/2024 22:55:07 has a Kind of Unspecified. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.
at Azure.Core.TypeFormatters.ToString(DateTime value, String format)
at Azure.Core.Utf8JsonWriterExtensions.WriteObjectValue(Utf8JsonWriter writer, Object value)
at Azure.Data.Tables.TableRestClient.CreateUpdateEntityRequest(String table, String partitionKey, String rowKey, Nullable1 timeout, String ifMatch, IDictionary2 tableEntityProperties, QueryOptions queryOptions)
at Azure.Data.Tables.TableClient.CreateUpdateOrMergeRequest(TableRestClient batchOperations, ITableEntity entity, TableUpdateMode mode, ETag ifMatch)
at Azure.Data.Tables.TableClient.BuildChangeSet(TableRestClient batchOperations, IEnumerable1 batch, Dictionary2 requestLookup, Guid batchId, Guid changesetId)
at Azure.Data.Tables.TableClient.SubmitTransactionInternalAsync(IEnumerable1 transactionalBatch, Guid batchId, Guid changesetId, Boolean async, CancellationToken cancellationToken) at Azure.Data.Tables.TableClient.SubmitTransactionAsync(IEnumerable1 transactionActions, CancellationToken cancellationToken)
at DurableTask.AzureStorage.Storage.ClientResponseExtensions.DecorateFailure[T](Task1 responseTask) in /_/src/DurableTask.AzureStorage/Storage/ClientResponseExtensions.cs:line 48 at DurableTask.AzureStorage.Storage.Table.ExecuteBatchAsync(IEnumerable1 batchOperation, CancellationToken cancellationToken) in //src/DurableTask.AzureStorage/Storage/Table.cs:line 174
at DurableTask.AzureStorage.Tracking.AzureTableTrackingStore.UploadHistoryBatch(String instanceId, String sanitizedInstanceId, String executionId, IList1 historyEventBatch, StringBuilder historyEventNamesBuffer, Int32 numberOfTotalEvents, Int32 episodeNumber, Int32 estimatedBatchSizeInBytes, Nullable1 eTagValue, Boolean isFinalBatch, CancellationToken cancellationToken) in //src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs:line 1193
at DurableTask.AzureStorage.Tracking.AzureTableTrackingStore.UpdateStateAsync(OrchestrationRuntimeState newRuntimeState, OrchestrationRuntimeState oldRuntimeState, String instanceId, String executionId, Nullable1 eTagValue, Object trackingStoreContext, CancellationToken cancellationToken) in /_/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs:line 972 at DurableTask.AzureStorage.AzureStorageOrchestrationService.CompleteTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem workItem, OrchestrationRuntimeState newOrchestrationRuntimeState, IList1 outboundMessages, IList1 orchestratorMessages, IList1 timerMessages, TaskMessage continuedAsNewMessage, OrchestrationState orchestrationState) in //src/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs:line 1218
at DurableTask.Core.TaskOrchestrationDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem) in //src/DurableTask.Core/TaskOrchestrationDispatcher.cs:line 612
at DurableTask.Core.TaskOrchestrationDispatcher.OnProcessWorkItemSessionAsync(TaskOrchestrationWorkItem workItem) in //src/DurableTask.Core/TaskOrchestrationDispatcher.cs:line 211
at DurableTask.Core.WorkItemDispatcher`1.ProcessWorkItemAsync(WorkItemDispatcherContext context, Object workItemObj) in //src/DurableTask.Core/WorkItemDispatcher.cs:line 459
While it might be considered not correct usage of the CreateTimer method it is still a breaking change, and the stack trace doesn't point to a correct place where the actual issue is. It would be helpful to add some check during a timer creation and throw an exception when a non-UTC date time provided.
The text was updated successfully, but these errors were encountered:
ivaliyivanov
changed the title
System.NotSupportedException is thrown during task execution when a timer created with non UTC DateTime originally.
System.NotSupportedException is thrown during task execution when a timer created with non UTC DateTime originally (v2.0.0-rcX).
Jul 8, 2024
We had a timer which was created with non UTC DateTime format:
await context.CreateTimer(allocationResult.NextProjectedChange.Value.DateTime, null);
it used to be working with pre 2.0.0 DTF version but now it throws an exception, later in stack, after the timer is created and when a task is picked up for execution:
message": TaskOrchestrationDispatcher-b16f0d531284437aa1371a4493157b75-0: Unhandled exception with work item '22d6a199b42b4ab2ba41c4fc69ac7071:1': System.NotSupportedException: DateTime 06/26/2024 22:55:07 has a Kind of Unspecified. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.
at Azure.Core.TypeFormatters.ToString(DateTime value, String format)
at Azure.Core.Utf8JsonWriterExtensions.WriteObjectValue(Utf8JsonWriter writer, Object value)
at Azure.Data.Tables.TableRestClient.CreateUpdateEntityRequest(String table, String partitionKey, String rowKey, Nullable
1 timeout, String ifMatch, IDictionary
2 tableEntityProperties, QueryOptions queryOptions)at Azure.Data.Tables.TableClient.CreateUpdateOrMergeRequest(TableRestClient batchOperations, ITableEntity entity, TableUpdateMode mode, ETag ifMatch)
at Azure.Data.Tables.TableClient.BuildChangeSet(TableRestClient batchOperations, IEnumerable
1 batch, Dictionary
2 requestLookup, Guid batchId, Guid changesetId)at Azure.Data.Tables.TableClient.SubmitTransactionInternalAsync(IEnumerable
1 transactionalBatch, Guid batchId, Guid changesetId, Boolean async, CancellationToken cancellationToken) at Azure.Data.Tables.TableClient.SubmitTransactionAsync(IEnumerable
1 transactionActions, CancellationToken cancellationToken)at DurableTask.AzureStorage.Storage.ClientResponseExtensions.DecorateFailure[T](Task
1 responseTask) in /_/src/DurableTask.AzureStorage/Storage/ClientResponseExtensions.cs:line 48 at DurableTask.AzureStorage.Storage.Table.ExecuteBatchAsync(IEnumerable
1 batchOperation, CancellationToken cancellationToken) in //src/DurableTask.AzureStorage/Storage/Table.cs:line 174at DurableTask.AzureStorage.Tracking.AzureTableTrackingStore.UploadHistoryBatch(String instanceId, String sanitizedInstanceId, String executionId, IList
1 historyEventBatch, StringBuilder historyEventNamesBuffer, Int32 numberOfTotalEvents, Int32 episodeNumber, Int32 estimatedBatchSizeInBytes, Nullable
1 eTagValue, Boolean isFinalBatch, CancellationToken cancellationToken) in //src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs:line 1193at DurableTask.AzureStorage.Tracking.AzureTableTrackingStore.UpdateStateAsync(OrchestrationRuntimeState newRuntimeState, OrchestrationRuntimeState oldRuntimeState, String instanceId, String executionId, Nullable
1 eTagValue, Object trackingStoreContext, CancellationToken cancellationToken) in /_/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs:line 972 at DurableTask.AzureStorage.AzureStorageOrchestrationService.CompleteTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem workItem, OrchestrationRuntimeState newOrchestrationRuntimeState, IList
1 outboundMessages, IList1 orchestratorMessages, IList
1 timerMessages, TaskMessage continuedAsNewMessage, OrchestrationState orchestrationState) in //src/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs:line 1218at DurableTask.Core.TaskOrchestrationDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem) in //src/DurableTask.Core/TaskOrchestrationDispatcher.cs:line 612
at DurableTask.Core.TaskOrchestrationDispatcher.OnProcessWorkItemSessionAsync(TaskOrchestrationWorkItem workItem) in //src/DurableTask.Core/TaskOrchestrationDispatcher.cs:line 211
at DurableTask.Core.WorkItemDispatcher`1.ProcessWorkItemAsync(WorkItemDispatcherContext context, Object workItemObj) in //src/DurableTask.Core/WorkItemDispatcher.cs:line 459
While it might be considered not correct usage of the CreateTimer method it is still a breaking change, and the stack trace doesn't point to a correct place where the actual issue is. It would be helpful to add some check during a timer creation and throw an exception when a non-UTC date time provided.
The text was updated successfully, but these errors were encountered: