Add TTRPC client#3279
Conversation
|
Build succeeded.
|
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3279 +/- ##
==========================================
+ Coverage 44.4% 44.61% +0.21%
==========================================
Files 113 112 -1
Lines 12231 12172 -59
==========================================
Hits 5431 5431
+ Misses 5966 5907 -59
Partials 834 834
Continue to review full report at Codecov.
|
fuweid
left a comment
There was a problem hiding this comment.
I am not sure that it is good way to import the containerd client package into the runtime package.
The containerd client is used to assemble components together. It maybe introduce cyclic issue here.
However, the change is look good basically. 👍
|
Build succeeded.
|
Signed-off-by: Maksym Pavlenko <[email protected]>
|
Build succeeded.
|
The client package has no dependencies on |
|
recheck |
|
Build succeeded.
|
Yeah!. We can move it to the sub-package in next time. The change is LGTM. |
|
Oh, sorry I didn't catch the containerd import the first time. We cannot do this. The shim's cannot import the main containerd package as that brings in GRPC and the overhead, The shim sizes more than double with this change: It has to be broken out and the dependency on the containerd package removed before merging |
Signed-off-by: Maksym Pavlenko <[email protected]>
|
Moved the client to |
|
Build succeeded.
|
|
Moving to subpackage solved the import of containerd: |
|
LGTM |
In firecracker-containerd project we use a GRPC plugin for containerd to accept requests from client and route them to a correct runtime shim (to manage microVMs). Both shim and plugin implement same protobuf interface. In order to make it work we have to implement both TTRPC and GRPC versions of this interface (GRPC for plugin to accept requests from client and ttrpc version for thim).
With recent merge of ttrpc plugins support in containerd we can avoid this problem and have just one ttrpc version, but we lack of a ttrpc client that can be used to make calls.
This PR adds the generic ttrpc client and refactors shim events publisher in favor of the new client. This can be used for plugins as well, or any other ttrpc communication (like task service).
Feedback is highly appreciated.
ref: firecracker-microvm/firecracker-containerd#180 and #3049
Signed-off-by: Maksym Pavlenko [email protected]