feat(workspace): forward per-workspace compute provider to CP (multi-provider RFC)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 9s
E2E Chat / detect-changes (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
CI / Python Lint & Test (pull_request) Successful in 23s
Harness Replays / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
qa-review / approved (pull_request_target) Failing after 4s
gate-check-v3 / gate-check (pull_request_target) Successful in 4s
sop-checklist / review-refire (pull_request_target) Has been skipped
security-review / approved (pull_request_target) Failing after 5s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request_target) Failing after 4s
CI / Detect changes (pull_request) Successful in 39s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 28s
CI / Canvas (Next.js) (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
CI / Canvas Deploy Status (pull_request) Has been skipped
Harness Replays / Harness Replays (pull_request) Successful in 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 27s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1m15s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m46s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m23s
CI / Platform (Go) (pull_request) Successful in 4m5s
CI / all-required (pull_request) Successful in 7s
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Failing after 7m47s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Failing after 12m44s
qa-review / approved (pull_request_review) Has been skipped
security-review / approved (pull_request_review) Has been skipped
sop-tier-check / tier-check (pull_request_review) Failing after 6s
audit-force-merge / audit (pull_request_target) Successful in 12s

WorkspaceCompute.Provider -> WorkspaceConfig.Provider -> cpProvisionRequest.provider -> CP /cp/workspaces/provision (routes to its WorkspaceProvisioner, controlplane PR #566). Cloud/compute provider, distinct from the LLM/model provider. Empty/aws = default EC2 (unchanged). Pairs with cp#573; Hetzner workspace boot live-proven (A2A card 200 on :8000).
This commit is contained in:
core-be
2026-06-06 05:59:43 +00:00
parent 757768aee4
commit 2f5536fd48
4 changed files with 11 additions and 0 deletions
@@ -332,6 +332,7 @@ func (h *WorkspaceHandler) buildProvisionerConfig(
InstanceType: payload.Compute.InstanceType,
DiskGB: int32(payload.Compute.Volume.RootGB),
DataPersistence: payload.Compute.DataPersistence,
Provider: payload.Compute.Provider,
Display: provisioner.WorkspaceDisplayConfig{
Mode: payload.Compute.Display.Mode,
Width: payload.Compute.Display.Width,
@@ -174,6 +174,11 @@ type WorkspaceCompute struct {
// disk (wiped each recreate — privacy); "" = auto (desktop-control persists,
// others follow the org flag). Forwarded verbatim to CP's data_persistence.
DataPersistence string `json:"data_persistence,omitempty"`
// Provider is the CLOUD/compute backend for this workspace box (multi-provider
// RFC, per-workspace): ""/"aws" = default EC2; "hetzner"/"gcp" route to the
// CP WorkspaceProvisioner. Distinct from the LLM/model provider. Forwarded to
// CP /cp/workspaces/provision `provider`.
Provider string `json:"provider,omitempty"`
}
type CreateWorkspacePayload struct {
@@ -161,6 +161,9 @@ type cpProvisionRequest struct {
Tier int `json:"tier"`
InstanceType string `json:"instance_type,omitempty"`
DiskGB int32 `json:"disk_gb,omitempty"`
// Provider routes the CP to the compute backend for this workspace box
// (multi-provider RFC, per-workspace). Distinct from the LLM/model provider.
Provider string `json:"provider,omitempty"`
// DataPersistence is the per-workspace durable-data choice (internal#734);
// CP validates the enum at its provision edge and resolves the data volume
// from it. Empty = auto (omitted on the wire).
@@ -257,6 +260,7 @@ func (p *CPProvisioner) Start(ctx context.Context, cfg WorkspaceConfig) (string,
InstanceType: cfg.InstanceType,
DiskGB: cfg.DiskGB,
DataPersistence: cfg.DataPersistence,
Provider: cfg.Provider,
Display: cfg.Display,
PlatformURL: cfg.PlatformURL,
Env: env,
@@ -100,6 +100,7 @@ type WorkspaceConfig struct {
InstanceType string // Optional CP EC2 instance type override (SaaS only)
DiskGB int32 // Optional CP root volume size override in GiB (SaaS only)
DataPersistence string // internal#734: "persist"|"ephemeral"|"" — durable-data choice forwarded to CP (SaaS only)
Provider string // multi-provider RFC: ""/"aws"|"hetzner"|"gcp" compute backend for the workspace box (per-workspace; distinct from LLM/model provider). Forwarded to CP.
Display WorkspaceDisplayConfig
EnvVars map[string]string // Additional env vars (API keys, etc.)
PlatformURL string