Skip to content

Commit

Permalink
Fix tag serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
wsugarman authored and nytian committed Oct 25, 2023
1 parent 252d0ac commit edf4f19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/DurableTask.AzureStorage/OrchestrationInstanceStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace DurableTask.AzureStorage
{
using System;
using System.Collections.Generic;
using Azure;
using Azure.Data.Tables;

Expand All @@ -35,7 +34,7 @@ class OrchestrationInstanceStatus : ITableEntity
public string RuntimeStatus { get; set; }
public DateTime? ScheduledStartTime { get; set; }
public int Generation { get; set; }
public IDictionary<string, string> Tags { get; set; }
public string Tags { get; set; }
public string PartitionKey { get; set; }
public string RowKey { get; set; }
public DateTimeOffset? Timestamp { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ async Task<OrchestrationState> 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)
{
Expand Down Expand Up @@ -716,7 +718,7 @@ public override async Task<bool> 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,
Expand Down

0 comments on commit edf4f19

Please sign in to comment.