Skip to content

Reflection information is only published for a single service #452

@jplotzke

Description

@jplotzke

The current gRPC server LabVIEW generator code creates an array of reflection descriptor strings which is passed to the server DLL to publish via the gRPC reflection service. Each element of this array represents a generated reflection string for each proto file parsed (so if one generates a gRPC server from 3 proto files, this array would contain 3 elements; one for each proto file used).

In the LabVIEW code, we iterate over this array and send each element down to the DLL separately:
Image

However, in the DLL, we constantly are replacing the descriptor string with the next element:

LIBRARY_EXPORT void DeserializeReflectionInfo(grpc_labview::LStrHandle serializedFileDescriptor)
{
std::string serializedDescriptorStr = grpc_labview::GetLVString(serializedFileDescriptor);
grpc_labview::ProtoDescriptorString::getInstance()->setDescriptor(serializedDescriptorStr);
}

As a result, only the last service's reflection descriptor string to be sent to the DLL is used and only that service is published via gRPC reflection.

Either the DLL should be able to capture and accumulate these descriptor strings for multiple services -- or the LabVIEW code should concatenate them together (note that I'm not sure if that's the appropriate operation) and pass a single string which represents all registered services at once just before calling Start Server.vi

AB#3142086

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions