-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-4522 RSDK-3601 Add complex module example #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This complex module still doesn't work: the gRPC services for gizmo and summation don't seem to get added to the generated pool. I'm looking into why that is, but I thought it might be good to get some review on everything else in the meantime (I don't think much will change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, looking pretty good! thanks for putting this together.
can you add links out to the example module repos like in #152? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not jumping into the review of the new complex module and client, but please lmk if you would like me to.
@benjirewis - I know there was some discussion about making the example modules standalone projects embedded within this repo, much like the example projects are today. I'd suggest for that to happen in another ticket / review rather than this one. |
@cheukt added a reference similar to the ones you added in #152 for the complex module (thanks for adding those other ones). @acmorrow filed https://viam.atlassian.net/browse/RSDK-5131. I won't do that work as part of this PR. |
@benjirewis - Do you think it might be possible to pull the fix for https://viam.atlassian.net/browse/RSDK-4275 out into its own PR, which I would immediately LGTM, in the interest of getting that fix committed? It's just the two |
709a6a7
to
f5ab178
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to write test_module.cpp
, but gRPC service descriptors are now working properly. I'll move this out of draft, and it's ready for another review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM for the build system changes for the complex module example, and for the other SDK changes outside the examples. I'll leave the specifics of the complex example implementation to others.
@stuqdog Adding tests is not super trivial (having some issues linking the generated protobuf files into the existing test suite architecture). If you don't mind I'm gonna kick out that work into another ticket/PR (https://viam.atlassian.net/browse/RSDK-5226). Per @cheukt's suggestion, I tested the custom base, gizmo and summation with the Python complex module client, and everything seems to be working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on this! A couple minor things, but in general this is looking great!
file(CHMOD ${BUF_COMMAND} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) | ||
endif() | ||
|
||
# Buf only goes back to 1.41.1 for generation against their "custom remote" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) I suspect this comment was copy pasted from the top level CMakeLists.txt? I think it's a bit out of date at this point. Buf no longer supports remote generation and so we no longer make distinctions between "before 1.41.1" and "between 1.41.1 and 1.51".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks for that background; I did indeed copy this from the top level CMakeLists.txt
. I've removed the comment, but are you saying that I don't even need two different buf.yaml files, as remote generation is not a thing anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you still need two forms. In the past there were three required forms, and this comment was sort of trying to explain why. But we are now down to two forms. So, just remove the comment.
Eventually, we should DRY this logic with src/viam/api/CMakeLists.txt
by moving buf
-based proto generation support into a tool. That tool should be installed as part of the SDK, so that clients of the SDK can make use of it for their own proto generation needs. That'd be more or less forced by making the modules standalone projects anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice; copied your comment to https://viam.atlassian.net/browse/RSDK-5131.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
1dc4370
to
969ebdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
969ebdb
to
2712255
Compare
RSDK-4522
RSDK-3601
Adds a complex module example (based on the Python and Go implementations). Validates that dependencies exist in the
ModuleService
.