E2E scripts — server-side driver factory wiring for Modbus / AB CIP / AB Legacy / S7 #209

Closed
opened 2026-04-21 10:31:13 -04:00 by dohertj2 · 1 comment
Owner

Umbrella tracking issue. scripts/e2e/ (shipped in PRs #207, #208, and this PR) drives each driver CLI + verifies via otopcua-cli. Stages 1-2 (driver-only probe + loopback) work today — verified against docker-compose fixtures. Stages 3-5 (anything crossing the OtOpcUa server) are blocked on this.

Root cause

src/ZB.MOM.WW.OtOpcUa.Server/Program.cs:98-104 only registers Galaxy + FOCAS:

GalaxyProxyDriverFactoryExtensions.Register(registry);
FocasDriverFactoryExtensions.Register(registry);

DriverInstanceBootstrapper.cs:55-61 silently skips any DriverType without a registered factory. A perfect DriverType='Modbus' row in the Config DB gets logged as "no registered factory" and no-op'd.

Scope per driver

For each of Modbus / AB CIP / AB Legacy / S7:

  1. Author {Name}DriverFactoryExtensions static class in the driver project (mirror GalaxyProxyDriverFactoryExtensions.cs).
  2. Add the .Register(registry) call in Program.cs.
  3. Author a seed SQL script under scripts/smoke/seed-{driver}-smoke.sql (Cluster + ClusterNode + Generation + Namespace + UnsArea/UnsLine/Equipment + DriverInstance + Tag rows, ending in EXEC sp_PublishGeneration).
  4. Verify end-to-end by booting the server + running scripts/e2e/test-{driver}.ps1 with the bridge NodeId the seed publishes.

Child issues

Umbrella tracking issue. `scripts/e2e/` (shipped in PRs #207, #208, and this PR) drives each driver CLI + verifies via `otopcua-cli`. Stages 1-2 (driver-only probe + loopback) work today — verified against docker-compose fixtures. **Stages 3-5 (anything crossing the OtOpcUa server) are blocked on this.** ## Root cause `src/ZB.MOM.WW.OtOpcUa.Server/Program.cs:98-104` only registers Galaxy + FOCAS: ``` GalaxyProxyDriverFactoryExtensions.Register(registry); FocasDriverFactoryExtensions.Register(registry); ``` `DriverInstanceBootstrapper.cs:55-61` silently skips any `DriverType` without a registered factory. A perfect `DriverType='Modbus'` row in the Config DB gets logged as "no registered factory" and no-op'd. ## Scope per driver For each of Modbus / AB CIP / AB Legacy / S7: 1. Author `{Name}DriverFactoryExtensions` static class in the driver project (mirror `GalaxyProxyDriverFactoryExtensions.cs`). 2. Add the `.Register(registry)` call in `Program.cs`. 3. Author a seed SQL script under `scripts/smoke/seed-{driver}-smoke.sql` (Cluster + ClusterNode + Generation + Namespace + UnsArea/UnsLine/Equipment + DriverInstance + Tag rows, ending in `EXEC sp_PublishGeneration`). 4. Verify end-to-end by booting the server + running `scripts/e2e/test-{driver}.ps1` with the bridge NodeId the seed publishes. ## Child issues - Modbus: #210 - AB CIP: #211 - AB Legacy: #213 (also hardware-gated — see #222) - S7: #212
Author
Owner

Exit gate shipped in PR #218. Modbus live-verified end-to-end with 4/5 e2e stages passing (forward-bridge + subscribe-sees-change work through the server � proving factory + seed wiring is live). Remaining follow-ups: #219 (reverse-write authz) + #220 (AB CIP / S7 / AB Legacy live-boot replication). Closing umbrella; those follow-ups are separate work.

Exit gate shipped in PR #218. Modbus live-verified end-to-end with 4/5 e2e stages passing (forward-bridge + subscribe-sees-change work through the server � proving factory + seed wiring is live). Remaining follow-ups: #219 (reverse-write authz) + #220 (AB CIP / S7 / AB Legacy live-boot replication). Closing umbrella; those follow-ups are separate work.
dohertj2 referenced this issue from a commit 2026-04-30 08:21:26 -04:00
Phase 2 official close-out. Closes task #209. The 2026-04-18 exit-gate-phase-2-final.md captured Phase 2 state at PR 2 merge — four High/Medium adversarial findings still OPEN, Historian port + alarm subsystem + v1 archive deletion all deferred. Since then: PR 4 closed all four findings end-to-end (High 1 Read subscription-leak, High 2 no reconnect loop, Medium 3 SubscribeAsync doesn't push frames, Medium 4 WriteValuesAsync doesn't await OnWriteComplete — mapped + resolved inline in the new doc), PR 12 landed the richer historian quality mapper, PR 13 shipped GalaxyRuntimeProbeManager with per-Platform/AppEngine ScanState subscriptions + StateChanged events forwarded through the existing OnHostStatusChanged IPC frame, PR 14 wired the alarm subsystem (GalaxyAlarmTracker advising the four alarm-state attributes per IsAlarm=true attribute, raising AlarmTransition events forwarded through OnAlarmEvent IPC frames), Phase 3 PR 18 deleted the v1 source trees, and PR 61 closed V1_ARCHIVE_STATUS.md. Phase 2 is functionally done; this commit is the bookkeeping pass. New exit-gate-phase-2-closed.md at docs/v2/implementation/ — five-stream status table (A/B/C/D/E all complete with the specific close commits named), full resolution table for every 2026-04-18 adversarial finding mapped to the PR 4 resolution, cross-cutting deferrals table marking every one resolved (Historian SDK plugin port → done, subscription push frames → done under Medium 3, Historian-backed HistoryRead → done, alarm subsystem wire-up → done, reconnect-without-recycle → done under High 2, v1 archive deletion → done). Fresh 2026-04-20 test baseline captured from the current v2 tip: 1844 passing + 29 infra-gated skips across 21 test projects, including the net48 x86 Galaxy.Host.Tests suite (107 pass) that exercises the MXAccess COM path on the dev box. Flake observed — Configuration.Tests 70/71 on first full-solution run, 71/71 on retry; logged as a known non-stable flake rather than chased because it did not reproduce. The prior exit-gate-phase-2-final.md is kept in place (historical record of the 2026-04-18 snapshot) but gets a superseded-by banner at the top pointing at the new close-out doc so future readers land on current status first. docs/v2/plan.md Phase 2 section header gains the ✅ CLOSED 2026-04-20 marker + a link to the close-out doc so the top-level plan index reflects reality. "What Phase 2 closed means for Phase 3 and later" section in the new doc captures the downstream contract: Galaxy now runs as a first-class v2 driver with the same capability-interface shape as Modbus / S7 / AbCip / AbLegacy / TwinCAT / FOCAS / OpcUaClient; no v1 code path remains; the 2026-04-13 stability findings persist as named regression tests under tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.E2E/StabilityFindingsRegressionTests.cs so any future refactor reintroducing them trips the test. "Outstanding — not Phase 2 blockers" section lists the four pending non-Phase-2 tasks (#177, #194, #195, #199) so nobody mistakes them for Phase 2 tail work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#209