Repository navigation
feat: support deployments, sandboxes, and pools - #11
Merged
Merged
Conversation
The orchestrator grew three services the SDK did not cover. Add a client for each, alongside the existing Jobs: - Deployments — apply (declarative create-or-update), get, list, delete, revisions, and traffic splits for canaries, rollbacks, and release back to auto mode. - Sandboxes — create (claiming from a pool, or building a pod from an image), get, list, delete, plus the read-only sandbox pools. Exec and files stay out: they are a contract served inside the sandbox, not part of this API. - DeploymentPools — read pools, and activate/read/deactivate the activations that claim their warm pods, including async activation via Prefer: respond-async. The four services share one Transport, extracted from Jobs, so request building, error mapping, and JSON decoding have a single implementation; a Model\Data helper does the same for field validation across the new models. Also close two gaps in the existing surface: MountArtifact was missing sync/syncIntervalSeconds, and CallbackEvent was missing the deployment response and pool activation result events. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR expands the SDK with deployment, sandbox, and deployment-pool clients while extracting the existing Jobs HTTP logic into a shared transport.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure established. The existing Jobs transport behavior is preserved, and the new service clients consistently construct encoded routes, serialize optional fields, validate mode-specific inputs, and decode their documented response models without an identified reachable failure. Important Files Changed
Reviews (1): Last reviewed commit: "feat: support deployments, sandboxes, an..." | Re-trigger Greptile |
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.
The orchestrator grew three services the SDK did not cover. This adds a client for each, alongside the existing
Jobs.What's new
Deployments—apply()(declarative create-or-update),get,list,delete,revisions,setTraffic,release. Full spec support: hosts, autoscaling, probes, concurrency, replicas, runtime class, and the three timeouts. Traffic splits cover canaries and rollbacks, withrelease()handing traffic back to auto mode.Sandboxes—create,get,list,delete, plus read-onlypools/pool. Handles both create modes: claiming from apool(sub-second) or building a pod from animage(per-sandboxcpu,memory,runtimeClass,volumes). Exec and files stay out of the SDK deliberately — they're an HTTP contract served inside the sandbox, at the address in$sandbox->url, not part of this API.DeploymentPools—list,get,activate,activations,activation,deactivate, including async activation viaPrefer: respond-async.Drift fixed in the existing surface
MountArtifactwas missingsync/syncIntervalSeconds(workspace delta sync across runs). Appended after$dependsrather than inserted, so positional callers don't break.CallbackEventwas missingorchestrator.deployment.responseandorchestrator.pool.activation.result.Structure
The four services share one
Transport, extracted fromJobs, so request building, error mapping, and JSON decoding have a single implementation. An internalModel\Datahelper does the same for field validation across the thirteen new models, keeping them small at PHPStan level 8.Field names, list envelopes, and status vocabularies were read off the Go structs in
open-runtimes/orchestrator(at94b53b6) rather than the prose docs, which don't show several of the list shapes.Testing
Not included
Async deployment requests (
Prefer: respond-asyncto a deployment's host) are data-plane traffic to the gateway, not the orchestrator API this SDK wraps, so they aren't on a service client here.🤖 Generated with Claude Code