diff --git a/src/DurableTask.AzureStorage/OrchestrationInstanceStatus.cs b/src/DurableTask.AzureStorage/OrchestrationInstanceStatus.cs index 2cf8d8e96..29dea2c4d 100644 --- a/src/DurableTask.AzureStorage/OrchestrationInstanceStatus.cs +++ b/src/DurableTask.AzureStorage/OrchestrationInstanceStatus.cs @@ -14,7 +14,6 @@ namespace DurableTask.AzureStorage { using System; - using System.Collections.Generic; using Azure; using Azure.Data.Tables; @@ -35,7 +34,7 @@ class OrchestrationInstanceStatus : ITableEntity public string RuntimeStatus { get; set; } public DateTime? ScheduledStartTime { get; set; } public int Generation { get; set; } - public IDictionary Tags { get; set; } + public string Tags { get; set; } public string PartitionKey { get; set; } public string RowKey { get; set; } public DateTimeOffset? Timestamp { get; set; } diff --git a/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs b/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs index 49c2ed4ae..f602cd4a8 100644 --- a/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs +++ b/src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs @@ -462,7 +462,9 @@ async Task ConvertFromAsync(OrchestrationInstanceStatus orch orchestrationState.Output = orchestrationInstanceStatus.Output; orchestrationState.ScheduledStartTime = orchestrationInstanceStatus.ScheduledStartTime; orchestrationState.Generation = orchestrationInstanceStatus.Generation; - orchestrationState.Tags = orchestrationInstanceStatus.Tags; + orchestrationState.Tags = !string.IsNullOrEmpty(orchestrationInstanceStatus.Tags) + ? TagsSerializer.Deserialize(orchestrationInstanceStatus.Tags) + : null; if (this.settings.FetchLargeMessageDataEnabled) { @@ -716,7 +718,7 @@ public override async Task SetNewExecutionAsync( ["ScheduledStartTime"] = executionStartedEvent.ScheduledStartTime, ["ExecutionId"] = executionStartedEvent.OrchestrationInstance.ExecutionId, ["Generation"] = executionStartedEvent.Generation, - ["Tags"] = executionStartedEvent.Tags, + ["Tags"] = TagsSerializer.Serialize(executionStartedEvent.Tags), }; // It is possible that the queue message was small enough to be written directly to a queue message,