From 524a0b56065dfc36ae481aa07f732254e6ded75d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 13 Jul 2026 10:10:06 -0400 Subject: [PATCH] refactor(r2-02): remove bulkhead fields from the resilience form (01/U-6) --- ...resilience-config-hardening-plan.md.tasks.json | 2 +- .../Shared/Drivers/DriverResilienceSection.razor | 4 ---- .../Shared/Drivers/ResilienceFormModel.cs | 15 +-------------- .../ResilienceFormModelTests.cs | 9 ++++----- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/archreview/plans/R2-02-resilience-config-hardening-plan.md.tasks.json b/archreview/plans/R2-02-resilience-config-hardening-plan.md.tasks.json index 7a9d626a..2db7944a 100644 --- a/archreview/plans/R2-02-resilience-config-hardening-plan.md.tasks.json +++ b/archreview/plans/R2-02-resilience-config-hardening-plan.md.tasks.json @@ -12,7 +12,7 @@ { "id": 8, "subject": "S-8/P-4 invoker: cache the no-retry options snapshot once per invoker + add RecordCallStart/Complete tracker accounting to the non-idempotent arm + 2 CapabilityInvokerTests", "status": "completed", "blockedBy": [7] }, { "id": 9, "subject": "S-8 docs + form: fix WriteIdempotentAttribute's false 'reads via reflection' claim; note the non-idempotent production default; disable Write/Ack retry cells in the razor", "status": "completed", "blockedBy": [7, 5] }, { "id": 10, "subject": "U-6 delete (Core): remove BulkheadMaxConcurrent/MaxQueue from DriverResilienceOptions + parser shape/merge/doc-example; add BulkheadKeys_InStoredJson_AreIgnored (migration-free contract)", "status": "completed", "blockedBy": [2, 6] }, - { "id": 11, "subject": "U-6 delete (AdminUI): strip bulkhead fields from ResilienceFormModel + the two razor inputs; update ResilienceFormModelTests", "status": "pending", "blockedBy": [5, 10] }, + { "id": 11, "subject": "U-6 delete (AdminUI): strip bulkhead fields from ResilienceFormModel + the two razor inputs; update ResilienceFormModelTests", "status": "completed", "blockedBy": [5, 10] }, { "id": 12, "subject": "U-6 doc sweep (seam xmldocs, OTOPCUA0001 message + analyzer tests, operator docs; leave migrations/WedgeDetector/historical plans) + Options_properties_are_exactly_the_pipeline_wired_set knob-inertness guard", "status": "pending", "blockedBy": [10, 11] }, { "id": 13, "subject": "C-7 RED tests: unknown top-level key / unknown capability / unknown per-policy field survive round-trip; malformed JSON sets ParseFailed and ToJson returns the original text", "status": "pending", "blockedBy": [11] }, { "id": 14, "subject": "C-7 implement: JsonObject-bag FromJson/ToJson (TagConfigJson idiom), ParseFailed + RawStoredJson, blank->null contract preserved, parser-interop test green", "status": "pending", "blockedBy": [13] }, diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/DriverResilienceSection.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/DriverResilienceSection.razor index 8936f748..4326c428 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/DriverResilienceSection.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/DriverResilienceSection.razor @@ -7,10 +7,6 @@ (see docs/v2/driver-stability.md). Set only what you need to override.

-
-
-
-
diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/ResilienceFormModel.cs b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/ResilienceFormModel.cs index 851d7a6d..fa9aeb7e 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/ResilienceFormModel.cs +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Drivers/ResilienceFormModel.cs @@ -15,10 +15,6 @@ public sealed class ResilienceFormModel public static readonly string[] Capabilities = ["Read", "Write", "Discover", "Subscribe", "Probe", "AlarmSubscribe", "AlarmAcknowledge", "HistoryRead"]; - /// Gets or sets the bulkhead max-concurrency override; null = use the tier default. - public int? BulkheadMaxConcurrent { get; set; } - /// Gets or sets the bulkhead max-queue-length override; null = use the tier default. - public int? BulkheadMaxQueue { get; set; } /// Gets or sets the driver recycle-interval override, in seconds; null = use the tier default. public int? RecycleIntervalSeconds { get; set; } @@ -92,8 +88,6 @@ public sealed class ResilienceFormModel catch (JsonException) { return model; } // malformed -> empty form; raw view (next task) shows the text if (shape is null) return model; - model.BulkheadMaxConcurrent = shape.BulkheadMaxConcurrent; - model.BulkheadMaxQueue = shape.BulkheadMaxQueue; model.RecycleIntervalSeconds = shape.RecycleIntervalSeconds; if (shape.CapabilityPolicies is not null) foreach (var (cap, p) in shape.CapabilityPolicies) @@ -119,14 +113,11 @@ public sealed class ResilienceFormModel BreakerFailureThreshold = kv.Value.BreakerFailureThreshold, }); - var hasAny = BulkheadMaxConcurrent is not null || BulkheadMaxQueue is not null - || RecycleIntervalSeconds is not null || caps.Count > 0; + var hasAny = RecycleIntervalSeconds is not null || caps.Count > 0; if (!hasAny) return null; var shape = new Shape { - BulkheadMaxConcurrent = BulkheadMaxConcurrent, - BulkheadMaxQueue = BulkheadMaxQueue, RecycleIntervalSeconds = RecycleIntervalSeconds, CapabilityPolicies = caps.Count > 0 ? caps : null, }; @@ -136,10 +127,6 @@ public sealed class ResilienceFormModel /// Wire shape of the resilience-override JSON, as consumed by DriverResilienceOptionsParser. private sealed class Shape { - /// Gets or sets the bulkhead max-concurrency override. - public int? BulkheadMaxConcurrent { get; set; } - /// Gets or sets the bulkhead max-queue-length override. - public int? BulkheadMaxQueue { get; set; } /// Gets or sets the driver recycle-interval override, in seconds. public int? RecycleIntervalSeconds { get; set; } /// Gets or sets the per-capability overrides, keyed by capability name. diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ResilienceFormModelTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ResilienceFormModelTests.cs index 60773454..301797b7 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ResilienceFormModelTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ResilienceFormModelTests.cs @@ -13,7 +13,7 @@ public class ResilienceFormModelTests [Fact] public void Partial_override_round_trips() { - var m = new ResilienceFormModel { BulkheadMaxConcurrent = 16 }; + var m = new ResilienceFormModel { RecycleIntervalSeconds = 3600 }; m.Policies["Read"].TimeoutSeconds = 5; m.Policies["Read"].RetryCount = 5; @@ -21,7 +21,7 @@ public class ResilienceFormModelTests json.ShouldNotBeNull(); var back = ResilienceFormModel.FromJson(json); - back.BulkheadMaxConcurrent.ShouldBe(16); + back.RecycleIntervalSeconds.ShouldBe(3600); back.Policies["Read"].TimeoutSeconds.ShouldBe(5); back.Policies["Write"].IsEmpty.ShouldBeTrue(); } @@ -30,7 +30,7 @@ public class ResilienceFormModelTests public void Malformed_json_yields_empty_model() { var m = ResilienceFormModel.FromJson("{ not valid json"); - m.BulkheadMaxConcurrent.ShouldBeNull(); + m.RecycleIntervalSeconds.ShouldBeNull(); m.Policies["Read"].IsEmpty.ShouldBeTrue(); } @@ -67,12 +67,11 @@ public class ResilienceFormModelTests [Fact] public void Emitted_json_is_consumable_by_the_runtime_parser() { - var m = new ResilienceFormModel { BulkheadMaxConcurrent = 16 }; + var m = new ResilienceFormModel(); m.Policies["Read"].TimeoutSeconds = 7; var opts = DriverResilienceOptionsParser.ParseOrDefaults(DriverTier.B, m.ToJson(), out var diag); diag.ShouldBeNull(); - opts.BulkheadMaxConcurrent.ShouldBe(16); opts.Resolve(DriverCapability.Read).TimeoutSeconds.ShouldBe(7); opts.Resolve(DriverCapability.Write).RetryCount.ShouldBe(0); }