[my_compute_zos_sdk] Implement typed client methods (lib.rs:24 TODO) #117
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_compute#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
crates/my_compute_zos_sdk/src/lib.rs:24ships a TODO:The neighbouring
crates/hero_compute_sdk/src/lib.rsexposes transport primitives (http_rpc_tcp,http_rpc_unix, URL helpers,ssh_secret_hash,HERO_PROXY_PORT, RPC path constants) but no typed method bindings forComputeService.deploy_vm/get_vm/delete_vm/list_vms/set_ssh_keys/ etc.Why this matters
Downstream consumers calling the per-node
ComputeServiceover cross-node JSON-RPC currently have to hand-roll the wire envelopes themselves. Specifically: at session s142,lhumina_code/hero_os_tfgrid_deployerbuilt aComputeAdapterincrates/hero_tfgrid_deployer_server/src/compute.rsthat does exactly this —serde_json::json!()envelope construction + manualVmdecode + error wrapping. The pattern mirrorshero_compute_sdk::send_heartbeatat line 341 of that file, so it works, but every new consumer pays the same boilerplate cost.A typed SDK would let consumers write:
instead of ~50 lines of envelope plumbing per method.
Suggested scope (v1)
Typed methods for the read+write methods our deployer adapter exercises:
deploy_vm(name, slice_count, secret, image, ssh_keys, node_sid) -> Vmget_vm(sid, secret) -> Vmdelete_vm(sid, secret) -> boollist_vms(secret) -> Vec<Vm>set_ssh_keys(secret, keys_json) -> Stringlist_slices() -> Vec<Slice>list_nodes() -> Vec<ComputeNode>Plus a
ComputeClientbuilder takinghost: &str, port: u16(defaultHERO_PROXY_PORT = 9997) and exposing both UDS + cross-node TCP transports.Could mirror Mahmoud's existing dispatch shape from
crates/my_compute_mos_server/src/cloud/rpc.rsfor method-name strings (ComputeService.deploy_vmetc.).Related
Not blocking for the demo-deployer arc (Track D); filing for follow-up housekeeping when convenient.
— mik-tf