fix(transport): carry ExternalSystem TimeoutSeconds through bundles + diff (arch-review 2026-08-19 P7-1, row-27 shape)
TimeoutSeconds is the per-system HTTP timeout ExternalSystemClient reads at call time and is deployed to sites (proto field 6), but Transport bundles silently dropped it: the DTO never carried it, export never wrote it, the importer's Add path reset it to 0, the Overwrite path left the target's stale value untouched, and ArtifactDiff never compared it (so a bundle whose only change was a tuned timeout previewed as Identical). Adds TimeoutSeconds as an additive-optional trailing field on ExternalSystemDto (schemaVersion stays 1.1, bundleFormatVersion unchanged) and threads it through EntitySerializer (export + import), BundleImporter (Add and Overwrite), and ArtifactDiff.CompareExternalSystem. Old-bundle semantics pinned: an absent field (null) falls back to the entity default on Add and leaves the target's existing value untouched on Overwrite/diff. Beefed up the RoundTripEquivalenceTests external-system fixture with a non-default TimeoutSeconds so the reflection round-trip guard actually exercises the field instead of comparing default against default. Swept the rest of the ExternalSystemDto shape against ExternalSystemDefinition field-by-field; no other operative field is missing.
This commit is contained in:
@@ -3090,6 +3090,9 @@ public sealed class BundleImporter : IBundleImporter
|
||||
existing.AuthConfiguration = dto.Secrets?.Values.TryGetValue("AuthConfiguration", out var auth) == true ? auth : null;
|
||||
existing.MaxRetries = dto.MaxRetries;
|
||||
existing.RetryDelay = dto.RetryDelay;
|
||||
// A bundle written before this field existed carries null — leave the
|
||||
// target's existing timeout untouched rather than resetting it to 0/unset.
|
||||
existing.TimeoutSeconds = dto.TimeoutSeconds ?? existing.TimeoutSeconds;
|
||||
await _externalRepo.UpdateExternalSystemAsync(existing, ct).ConfigureAwait(false);
|
||||
await _auditService.LogAsync(user, "Update", "ExternalSystem", existing.Id.ToString(), existing.Name,
|
||||
new { existing.Name, existing.EndpointUrl }, ct).ConfigureAwait(false);
|
||||
@@ -3123,6 +3126,9 @@ public sealed class BundleImporter : IBundleImporter
|
||||
AuthConfiguration = dto.Secrets?.Values.TryGetValue("AuthConfiguration", out var auth) == true ? auth : null,
|
||||
MaxRetries = dto.MaxRetries,
|
||||
RetryDelay = dto.RetryDelay,
|
||||
// Null (a bundle written before this field existed) falls back to the
|
||||
// entity's own "0 = unset" default.
|
||||
TimeoutSeconds = dto.TimeoutSeconds ?? 0,
|
||||
};
|
||||
return sys;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user