Skip to content

Document API contract for external driver transport #4896

@unsuman

Description

@unsuman

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vmdriversVM driver infrastructuredocumentationImprovements or additions to documentationexpert

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions