feat(server): implement all OpenAPI endpoints end-to-end#396
Merged
Conversation
Wire 15 previously-stubbed coordinator endpoints through gRPC to the worker service, replacing 501 Not Implemented with real proxy logic. Only exec_tty (WebSocket) remains as a stub. Proto layer (worker.proto): - Add 15 new RPCs: snapshot CRUD (5), clone, export/import (streaming), file upload/download (streaming), image pull/list/get, get_execution - Add ~20 new message types including streaming chunks Worker service (service.rs): - Implement all 15 RPC handlers calling BoxliteRuntime - Add snapshot_info_to_proto and image_info_to_proto converters - Enhance ActiveExecution with ExecStatus tracking (Running/Completed/Failed) - Add streaming support for export (server-stream) and import (client-stream) - Add tar-based file transfer via copy_into/copy_out Coordinator proxy (proxy.rs): - Replace 15 stubs with real REST→gRPC proxy implementations - Add any_active_worker_client helper for non-box-scoped endpoints - Clone handler registers BoxMapping for cloned box on same worker - Import handler uses scheduler for worker selection - Export/download stream gRPC responses as binary HTTP bodies - Upload/import convert HTTP body to gRPC client-streaming chunks Tests: - Update 15 stub tests to verify correct error behavior (404/503) - Add unit tests for proto conversion helpers and ExecStatus - 115 tests pass (66 unit + 43 integration + 6 conformance)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire 15 previously-stubbed coordinator endpoints through gRPC to the worker service, replacing 501 Not Implemented with real proxy logic. Only
exec_tty(WebSocket) remains as a stub.Test plan
cargo test -p boxlite-server— 115 tests pass (66 unit + 43 integration + 6 conformance)cargo clippy -p boxlite-server --tests -- -D warnings— zero warningscargo fmt -p boxlite-server -- --check— clean