Minor usability updates to gRPC code generator#451
Conversation
…e Server or Client" for better usability as a subVI
...lient Server Support New/Client Template/RPC Messages/Get Value for package_template_enum.vi
Show resolved
Hide resolved
labview source/gRPC lv Support/Shared/Get LV Enum Value from Proto Value.vi
Show resolved
Hide resolved
labview source/Client Server Support New/Server Template/Service Template.lvlib
Show resolved
Hide resolved
labview source/gRPC lv Support/Server API/Server/Register Reflection Descriptors.vi
Show resolved
Hide resolved
… FP names to `gRPC service in/out`
…output FP names to `gRPC service in/out`
|
@jasonmreding - I see the Should I revert back my VIPB updates and then manually edit the file to update the version and dependencies? |
I suspect that is it. I know the self hosted runner only has LV 2019 32 bit installed. IIRC VIPM will automatically modify the LV version for the package if you don't have the version of LV it specifies installed. I think VIPM displays a warning message about this though it may not be obvious what the impact of that message is. You should just be able to edit the xml in a text editor to revert the LV version back to its original form. |
…s and dependencies outside of VIPM to v1.6.0.1
|
@jasonmreding - Argh, still failing - this time for I opened each of the VIPB files in VIPM, built each package to dry-run the build, then re-saved. Then opened each VIPB file and manually edited the LV version back to 32-bit. Hoping this one helps. Appreciate the patience. :) |
Ok, happened again with same error. Odd since I'm able to run the I can try installing LV 2019 32-bit and see if I can repro this issue later. |
Yeah, I'm not sure what is going on. The error information returned isn't all that helpful and there isn't much logging available to determine how far things progressed or even which package is reporting the problem. You could try reverting all changes to the .vipb files back to the original other than the package and package dependency version updates and see if that helps. The VIPM error mentions I just tried opening the .vipb files on the self hosted runner with its version of VIPM, and I get the following error: I copied the same files to my dev machine, and I was able to open them without error. I am using So I don't know what is going on. Either there is a problem/bug with the different VIPM versions interoperating with each other or there is some weird caching/state issue with VIPM on the self hosted runner machine. As I was poking into this, the runner seems to have gone offline again so this might be a holding pattern until somebody can diagnose that again. |
Thanks. I've also reached out to JKI to see if they can shed any light for what an "invalid build signature" is and if they'd expect those GUIDs/ID values that change when I re-save the file to represent something specific or are they just random values that we can ignore. |
Good news - I set up a clean machine with LV 2019 32-bit and VIPM 2021.0 and I get the same error that you get on the build machine. So, I don't believe that this has anything to do with the runner. |
…m with LV 2019 32-bit
|
@jasonmreding - I reverted back the VIPB files, and then opened them on a system with LV 2019 32-bit and set all version properties again. VIPM 2021 can now open these files. I think the root cause is that these files can't be edited manually and the "ID" field must be a checksum of sort. In order to update these files, one must have LV 2019 32-bit installed so that VIPM doesn't change that field. |
|
In addition to the "RegistergRPC Messages.vI" reverting back to public, there are other accessors and type definitions that need to be moved back to public. Outlined the changes in this issue: #453 |
@jasonmreding - How about as a compromise, we move all of these items back to public scope, but issue a deprecation notice with the release notes that these will eventually be moved back protected? I do feel like some users moved up to v1.5.0.1 for the security updates (myself included) and then were surprised/not expecting the protected-scope items. With this, v1.6.0.1 maintains backwards-compatibility with previous applications which use these VIs. We still leave the new Then, once the base issues that cause people to use these VIs (like grabbing the UEs out of the class) are resolved, a v2.0.0 release is targeted which moves these back to protected-scope and issues a warning for breaking changes. |
I'm OK moving the items back to public scope. I think the hope in moving them to protected was to minimize the public API surface area for backward compatibility for things that were deemed to be implementation details and not proper public APIs. However, it seems that ship has sailed in this case. I'm not sure deprecation is really an option for the service initialization methods unless we are OK with requiring upcasting from I don't really see a path forward for keeping the event types protected unless we can come up with a default dispatching implementation that everybody is happy with. I'm not optimistic we will be able to do that. I was kind of hoping that code generating a custom |
…ver Internal UIs.vi`, `Read Server RPC Methods.vi` and all UE controls back to public scope.
…plotzke/grpc-labview into jplotzke/generation_updates
|
@kt-jplotzke The |
Thanks - Yeah, I see the |
….lvclass` and in the client template (so that they match).
@jasonmreding - Updates:
Note that the examples still use the old nomenclature and would need to be re-generated to align with the documentation. This may affect the AutoTests execution. Do you want that as part of this PR? |
I think this PR has already sprawled on longer than what would be considered ideal. At this point, I would rather perform additional refactoring/cleanup in follow on PRs that are easier to review in isolation. |


This pull request has several minor "quality of life" improvements to the client/server generator:
VIs required to run the server are moved to the generated server lvlib public scope. This allows incorporation of the gRPC service into a larger application. (Fixes Generated server lvlib should not make methods private that are needed to start the service #450)
Added icon text to "Rich to Flat" and "Flat to Rich" VIs (for both client and server generated VIs)

The generated enum converter VIs ("LV enum to proto enum" and vise-versa) used a CLFN to
labview_grpc_server.dllto convert LV enum values to/from proto enum values. As all other server DLL calls are wrapped ingrpc-lvsupport.lvlib(and also thatTranslateGrpcError.viis in private scope of that library), I created two wrapper functions in grpc-lvsupport.lvlib for these calls. The client template VIs are subsequently updated to use these wrapper VIs instead of the direct CLFN. (Fixes Generated Enum Flat/Rich converters should not call DLL in UI thread #447)In the spirit of the above update, I created a new method in the LV Support lvlib to wrap the
DeserializeReflectionInfoDLL call. This was previously called fromRegister Descriptors.viin the template server lvlib. I then updatedRegister Descriptors.vito call the newly createdRegister Reflection Descriptors.vi.labview_grpc_server.dllshould take place from the LV Support lvlib. This way, the DLL and associated VIs are packaged/versioned together and there's much less risk of breaking changes between versions. With the change above, I believe that alllabview_grpc_server.dllcalls are removed from the template server and client VIs and now are only called from thegrpc-lvsupport.lvlibVIs.I updated the Oneof template so that the set value template (and only the set value template) no longer requires the lvclass input (now set to recommended). This fixes Don't set input terminals unnecessarily to required #417.

Removed the name for the new local application context that's created by the main generation application. When using this generator as a subVI (to call it automatically for multiple services), calling it on the 2nd time resulted in an error that the application context name already exists. Not passing any name to this function ensures that a unique name is created every time, allowing it to run multiple times programmatically.

Updated label for "Generate" control to "Generate Server or Client?" for better naming when using generator tool as a subVI.

Standardized on lvclass input/output naming for FP controls/indicators throughout LV Servicer and server templates.
Servicer.lvclassnow usesgRPC server in/outServiceBase.lvclass,ServiceName Template.lvclass, andService Template.lvlibnow usegRPC service in/out