refactor(cloud): move off the deprecated /compute-services Management API endpoints#109
Merged
Merged
Conversation
… 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>
wmadden
approved these changes
Jul 17, 2026
commit: |
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 Management API team is phasing out
/v1/compute-services(the endpoints are marked@deprecatedin@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)
/v1/apps/{appId}; create viaPOST /v1/apps—projectIdnow travels in the body instead of the path.appEndpointDomain(wasserviceEndpointDomain).Deployment provider (Deployment.ts)
POST /v1/apps/{appId}/deployments; poll and start via/v1/deployments/{deploymentId}; promote viaPOST /v1/apps/{appId}/promotewith adeploymentIdbody.appEndpointDomain, so the follow-up app read after promote is gone (one fewer API call per deploy).versionId→deploymentIdto match the id it actually holds. Old stored version ids would not resolve against/v1/deploymentsanyway, 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/appslist now carriesbranchId, so when several same-named apps exist it resolves the default Branch and picks production instead of failing outright (the old API reportedbranchId: nullfor every service, which made that case unanswerable).examples/env-param/scripts/smoke.ts: the list rows carrybranchIdnow, 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:depsall pass.🤖 Generated with Claude Code