fix(transport): preserve MinTimeBetweenRuns + ExternalSystem retry fields in bundle DTOs
Add TimeSpan? MinTimeBetweenRuns to TemplateScriptDto and int MaxRetries / TimeSpan RetryDelay to ExternalSystemDto; wire both directions in EntitySerializer. Extends the existing script round-trip assertion and adds Roundtrip_external_system_preserves_retry_config.
This commit is contained in:
@@ -87,7 +87,8 @@ public sealed record TemplateScriptDto(
|
||||
string? TriggerConfiguration,
|
||||
string? ParameterDefinitions,
|
||||
string? ReturnDefinition,
|
||||
bool IsLocked);
|
||||
bool IsLocked,
|
||||
TimeSpan? MinTimeBetweenRuns);
|
||||
|
||||
public sealed record TemplateCompositionDto(
|
||||
string InstanceName,
|
||||
@@ -103,6 +104,8 @@ public sealed record ExternalSystemDto(
|
||||
string Name,
|
||||
string BaseUrl,
|
||||
string AuthType,
|
||||
int MaxRetries,
|
||||
TimeSpan RetryDelay,
|
||||
IReadOnlyList<ExternalSystemMethodDto> Methods,
|
||||
SecretsBlock? Secrets);
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ public sealed class EntitySerializer
|
||||
TriggerConfiguration: s.TriggerConfiguration,
|
||||
ParameterDefinitions: s.ParameterDefinitions,
|
||||
ReturnDefinition: s.ReturnDefinition,
|
||||
IsLocked: s.IsLocked)).ToList(),
|
||||
IsLocked: s.IsLocked,
|
||||
MinTimeBetweenRuns: s.MinTimeBetweenRuns)).ToList(),
|
||||
Compositions: t.Compositions.Select(c => new TemplateCompositionDto(
|
||||
InstanceName: c.InstanceName,
|
||||
ComposedTemplateName: templateNameById.TryGetValue(c.ComposedTemplateId, out var cn) ? cn : string.Empty)).ToList())).ToList(),
|
||||
@@ -89,6 +90,8 @@ public sealed class EntitySerializer
|
||||
Name: sys.Name,
|
||||
BaseUrl: sys.EndpointUrl,
|
||||
AuthType: sys.AuthType,
|
||||
MaxRetries: sys.MaxRetries,
|
||||
RetryDelay: sys.RetryDelay,
|
||||
Methods: methods,
|
||||
Secrets: secrets);
|
||||
}).ToList(),
|
||||
@@ -204,6 +207,7 @@ public sealed class EntitySerializer
|
||||
ParameterDefinitions = s.ParameterDefinitions,
|
||||
ReturnDefinition = s.ReturnDefinition,
|
||||
IsLocked = s.IsLocked,
|
||||
MinTimeBetweenRuns = s.MinTimeBetweenRuns,
|
||||
});
|
||||
}
|
||||
return t;
|
||||
@@ -253,6 +257,8 @@ public sealed class EntitySerializer
|
||||
{
|
||||
Id = ix + 1,
|
||||
AuthConfiguration = dto.Secrets?.Values.TryGetValue("AuthConfiguration", out var auth) == true ? auth : null,
|
||||
MaxRetries = dto.MaxRetries,
|
||||
RetryDelay = dto.RetryDelay,
|
||||
};
|
||||
externalSystems.Add(sys);
|
||||
foreach (var m in dto.Methods)
|
||||
|
||||
Reference in New Issue
Block a user