fix(configuration): resolve Medium code-review findings (Configuration-002, -003, -006, -009)
Configuration-002: sp_PublishGeneration is transaction-nesting aware (BEGIN TRANSACTION vs SAVE TRANSACTION on @@TRANCOUNT) so a caller's outer transaction survives a publish failure; sp_ValidateDraft wrapped in TRY/CATCH. Configuration-003: ValidatePathLength uses the cluster's actual Enterprise/Site lengths when available, falling back to the conservative approximation. Configuration-006: ResilientConfigReader treats a command-timeout TaskCanceledException as a fault (not caller cancellation) and falls back. Configuration-009: removed the checked-in plaintext sa connection string; CreateDbContext now requires OTOPCUA_CONFIG_CONNECTION. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,18 @@ public sealed class DraftSnapshot
|
||||
public required long GenerationId { get; init; }
|
||||
public required string ClusterId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Cluster's Enterprise segment (UNS level 1). When set, <see cref="DraftValidator"/> uses
|
||||
/// the actual length for path-length checks instead of a conservative 32-char upper bound.
|
||||
/// </summary>
|
||||
public string? Enterprise { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Cluster's Site segment (UNS level 2). When set, <see cref="DraftValidator"/> uses the
|
||||
/// actual length for path-length checks instead of a conservative 32-char upper bound.
|
||||
/// </summary>
|
||||
public string? Site { get; init; }
|
||||
|
||||
public IReadOnlyList<Namespace> Namespaces { get; init; } = [];
|
||||
public IReadOnlyList<DriverInstance> DriverInstances { get; init; } = [];
|
||||
public IReadOnlyList<Device> Devices { get; init; } = [];
|
||||
|
||||
Reference in New Issue
Block a user