feat(cloud): add BYOC placement flags and the five missing cloud commands - #82
Open
robertohluna wants to merge 1 commit into
Open
feat(cloud): add BYOC placement flags and the five missing cloud commands#82robertohluna wants to merge 1 commit into
robertohluna wants to merge 1 commit into
Conversation
…ands A customer using the CLI could not target their own cloud, and could not run the one mandatory manual step in BYOC onboarding. compute_placement_request was wired server-side on sandboxes, computers and deployments but reachable only over raw HTTP or MCP. Add --provider/--region-id/--pool-id/--host-id/--fallback to the create paths, validating only shape client-side: UUIDs, known provider and fallback values, and that --provider accompanies any placement flag. The per-provider target rules are left to the server, which is authoritative. Add cloud capabilities, accounts attach-gcp, regions update, pools update and nodes certify. certify auto-generates an idempotency key when omitted, since the server requires one and making every caller invent it is friction for no safety benefit.
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.
A customer using the CLI could not use BYOC at all — they could not target their own cloud, and could not perform the one mandatory manual step in onboarding.
compute_placement_requestis fully wired server-side but was reachable only over raw HTTP or MCP.Placement flags
--provider / --region-id / --pool-id / --host-id / --fallbackonsandbox create,computers createand the top-leveldeploy(which is the deployment-create entry point — there is no separatecreatesubcommand there).Client-side validation is shape only: UUID format, provider among the four known values, fallback among the two, and
--providerrequired once any placement flag is used, sincenormalize/1has no default provider and omitting it always fails server-side.The per-provider target rules are deliberately not duplicated — the server is authoritative and its error is surfaced. Worth recording what those rules actually are, since they are less obvious than they look:
miosaaws/gcpopencomputersThey are mutually exclusive, not optional.
opencomputersis a separate product feature rather than a cloud provider, and its runtime adapter returns a hard error, so it is not presented as a normal choice.Five missing endpoints
cloud capabilities·cloud accounts attach-gcp·cloud regions update·cloud pools update·cloud nodes certifynodes certifyis the important one — certification does not fire automatically, so until now the single mandatory manual step in BYOC onboarding was reachable only by hand-written curl. It auto-generates an idempotency key when omitted; the server requires one, and making every caller invent it is friction with no safety benefit since it stays retry-safe.attach-gcptakes two service-account emails — actuator and worker, both required and required to differ. Building to the single-account shape that appears on the stalemainof the server repo would have shipped a command that fails against the real API.Note on scope
regions updateandpools updateexpose a safe mutable subset, excludingtenant_id,cloud_account_id,provider,statusandlast_preflight_run_id— server-managed or dangerous, with no reasonable customer workflow needing them. Say if the full set should be exposed instead.Engine.Cloud.attach_access_keys/3remains routeless on the server — no route, no controller action — so it cannot be exposed here. Real gap, server-side.Tests
425 passing, up from 419. Covers flag parsing, UUID validation, and that placement lands in the create body with a bad UUID rejected before any network call.
typecheckandbuildclean.