feat(raw): re-migrate discovered-node injection onto the raw device subtree — IRediscoverable is inert in v3
#507
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
IRediscoverable.OnRediscoveryNeededcurrently changes nothing.DriverHostActor.HandleDiscoveredNodes(
src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Drivers/DriverHostActor.cs:986) hard-returns after a Debug log — adeliberate v3 Batch-4 guard, whose own comment ends "Re-migrating injection onto the raw device subtree is a
separate follow-up." This is that follow-up.
Why it was short-circuited. In v2 a driver-connected
FixedTreewas grafted under an equipment folder(equipment bound a driver). v3 retired that binding — equipment references raw tags via
UnsTagReference, anddiscovered raw tags are authored explicitly through the Batch-2
/rawbrowse-commit flow. The downstreammapper/materialiser were only half-migrated to the Raw tree and are still rooted at an equipment id, so letting
the message through would materialise incoherent nodes. Short-circuiting was correct; leaving it permanent is
the gap.
Effect today. Every driver implementing
IRediscoverablefires into a void:DeployWatcherobserving a Galaxy redeploy@tagschangeThe operator-visible symptom is uniform: the edge gains a point and the OPC UA tree does not change until
someone redeploys. The driver-side decision is log-observable (each driver logs that it raised rediscovery),
so this is a platform gap, not a per-driver bug — fixing it once lights up all four.
Scope sketch. Re-root the discovered-node mapper/materialiser at a Device in the
/rawtree ratherthan at an equipment id, and decide the authoring contract: auto-materialise discovered leaves, or surface them
as a pending-review set the operator commits (the latter matches the existing
/rawbrowse-commit flow andavoids a chatty edge rewriting the address space unattended). Whichever is chosen,
_discoveredByDriverandthe redeploy re-inject tail need to come back with it.
Acceptance. A driver raising
OnRediscoveryNeededresults in the new leaf being reachable in the servedaddress space (auto, or after an explicit commit) without a redeploy, live-verified on docker-dev against the
Sparkplug simulator (
docker restart otopcua-sparkplug-simforces a fresh birth; births are never retained).