fix(grpc-data): Browse does not list unsupported value nodes (#917)
Live gate fu916-1 found that listing an alarm-bearing tag as UnsupportedVariable made the consumer's whole remote-opc folder unbrowsable (BadNoCommunication): ProjectedNamespaceApplier applies a page all-or-nothing and TryEnsureProjectedVariable rejects any kind but Folder/Variable/Tag, on every consumer build. The origin now skips unsupported value nodes in Browse; they stay addressable (Unsupported) and exportable.
This commit is contained in:
@@ -399,6 +399,11 @@ public sealed partial class LocalDataServices : IDataConnectionFactory
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
if (Expired(start, request.Budget)) return Task.FromResult(Empty(DataItemStatus.Unavailable));
|
||||
var child = children[offset++];
|
||||
// #917: an unsupported value node (an alarm-bearing tag, or a data type v1 cannot carry) is never listed. Every
|
||||
// consumer build applies a browse page all-or-nothing and cannot materialise one, so listing it made the whole
|
||||
// folder unbrowsable on the consumer (BadNoCommunication). It stays addressable: GetMetadata/Read/Subscribe on
|
||||
// it answer Unsupported, and an export may still be rooted at it.
|
||||
if (child.Source is not null && !child.Supported) continue;
|
||||
if ((request.Filter is { Length: > 0 } filter && !child.Metadata.BrowseName.Contains(filter, StringComparison.Ordinal))
|
||||
|| !Allowed(catalog, context, child, DataOperations.Browse)) continue;
|
||||
var metadata = Metadata(catalog, context, target, child);
|
||||
|
||||
+3
-4
@@ -136,10 +136,9 @@ public sealed partial class LocalExportCatalog
|
||||
rawSources.Add(plan.NodeId, (source, enabled));
|
||||
var kind = ValueKind(plan.DataType);
|
||||
// #917: an alarm-bearing tag never gets a value (DriverHostActor keeps it out of the value fan-out; #896 gives it
|
||||
// no UNS variable), so it is exported as the explicit v1 UnsupportedVariable kind — browsable, Unsupported on
|
||||
// every value operation — rather than a Variable a consumer would wait on forever. The node is KEPT (an export
|
||||
// may be rooted at it, and its group folder still parents the A1 condition placement); its alarm is forwarded
|
||||
// as a condition (A1–A4), never as a value.
|
||||
// no UNS variable), so it is an unsupported value node: Browse does not list it (LocalDataServices) and every
|
||||
// value operation answers Unsupported, instead of a Variable a consumer would wait on forever. The node is KEPT
|
||||
// (an export may be rooted at it); its alarm is forwarded as a condition (A1–A4), never as a value.
|
||||
var supported = plan.Alarm is null && kind != DataValueKind.Unspecified
|
||||
&& (!plan.IsArray || DataValue.IsSupportedArrayElementKind(kind));
|
||||
var rawView = View(DataRealm.Raw, plan.NodeId, scope);
|
||||
|
||||
Reference in New Issue
Block a user