Skip to content

refactor(cloud): move off the deprecated /compute-services Management API endpoints#109

Merged
wmadden merged 1 commit into
mainfrom
claude/deprecate-compute-services-fd75ee
Jul 17, 2026
Merged

refactor(cloud): move off the deprecated /compute-services Management API endpoints#109
wmadden merged 1 commit into
mainfrom
claude/deprecate-compute-services-fd75ee

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

The Management API team is phasing out /v1/compute-services (the endpoints are marked @deprecated in @prisma/management-api-sdk); the replacement surface is /v1/apps + /v1/deployments. This moves every call site in the repo over.

What changed

ComputeService provider (ComputeService.ts)

  • Get/delete via /v1/apps/{appId}; create via POST /v1/appsprojectId now travels in the body instead of the path.
  • The endpoint field is appEndpointDomain (was serviceEndpointDomain).

Deployment provider (Deployment.ts)

  • Create via POST /v1/apps/{appId}/deployments; poll and start via /v1/deployments/{deploymentId}; promote via POST /v1/apps/{appId}/promote with a deploymentId body.
  • Promote returns the live appEndpointDomain, so the follow-up app read after promote is gone (one fewer API call per deploy).
  • The stored attribute is renamed versionIddeploymentId to match the id it actually holds. Old stored version ids would not resolve against /v1/deployments anyway, so there is no state-compat path to preserve — a pre-existing deployment reconciles fresh on its next change, which it did before too.

Scripts

  • scripts/ci-cleanup-utils.ts: lists via /apps?projectId=…, deletes via /apps/{id}. The "did not reach a delete-safe state" 409 retry is unchanged.
  • website/scripts/verify-deployed.ts: the /v1/apps list now carries branchId, so when several same-named apps exist it resolves the default Branch and picks production instead of failing outright (the old API reported branchId: null for every service, which made that case unanswerable).
  • examples/env-param/scripts/smoke.ts: the list rows carry branchId now, so the per-candidate detail reads are gone.
  • examples/pn-widgets/scripts/e2e-verify.ts: same list + field swap.

Verification

  • pnpm build, pnpm typecheck, pnpm test, pnpm test:scripts, pnpm lint, pnpm lint:deps all pass.
  • The deploy canary in CI exercises the new endpoints against the real platform.

🤖 Generated with Claude Code

… API endpoints

The Management API team is phasing out the /v1/compute-services surface;
its replacement is /v1/apps + /v1/deployments (the old endpoints are
marked @deprecated in @prisma/management-api-sdk). Switch every call
site:

- ComputeService provider: get/create/delete via /v1/apps; the create
  carries projectId in the body instead of the path, and the endpoint
  field is appEndpointDomain.
- Deployment provider: create via /v1/apps/{appId}/deployments, poll and
  start via /v1/deployments/{deploymentId}, promote via
  /v1/apps/{appId}/promote with a deploymentId body. Promote now returns
  the live endpoint domain, so the follow-up app read is gone. The
  stored attribute is renamed versionId -> deploymentId to match the id
  it actually holds.
- ci-cleanup, website verify-deployed, env-param smoke, pn-widgets
  e2e-verify: list apps via /v1/apps?projectId=... and read
  appEndpointDomain. The apps list now carries branchId, so
  verify-deployed disambiguates same-named apps by the default Branch
  instead of failing outright, and env-param smoke no longer needs a
  per-candidate detail read.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@109
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@109

commit: 4e2a2e8

@wmadden
wmadden merged commit 16fd68d into main Jul 17, 2026
16 of 17 checks passed
@wmadden
wmadden deleted the claude/deprecate-compute-services-fd75ee branch July 17, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants