The external driver gRPC API in Lima has no documented contract around call ordering or method semantics things like AdditionalSetupForSSH() being called before Start() finishes, the unclear safety of SSHAddress(), overall flow and working of the driver interface etc.
As part of my GSoC tasks last year, I was unable to provide a comprehensive doc that helps someone new to Lima implement external VM drivers. Additionally, I think we should add detailed comments to driver.proto file and auto-generate a reference page for the website using protoc-gen-doc, so the RPC contract stays in sync with the code and new driver authors have a clear guide, like:
|
// StartResponse is a streamed response for Start() RPC. It tries to mimic |
|
// errChan from pkg/driver/driver.go. The server sends an initial response |
|
// with success=true when Start() is initiated. If errors occur, they are |
|
// sent as success=false with the error field populated. When the error channel |
|
// closes, a final success=true message is sent. |
|
message StartResponse { |
|
bool success = 1; |
|
string error = 2; |
|
} |
Originally posted by @norio-nomura in #4345 (comment)
The external driver gRPC API in Lima has no documented contract around call ordering or method semantics things like
AdditionalSetupForSSH()being called beforeStart()finishes, the unclear safety ofSSHAddress(), overall flow and working of the driver interface etc.As part of my GSoC tasks last year, I was unable to provide a comprehensive doc that helps someone new to Lima implement external VM drivers. Additionally, I think we should add detailed comments to
driver.protofile and auto-generate a reference page for the website usingprotoc-gen-doc, so the RPC contract stays in sync with the code and new driver authors have a clear guide, like:lima/pkg/driver/external/driver.proto
Lines 49 to 57 in f121314
Originally posted by @norio-nomura in #4345 (comment)