Skip to content

feat: migrate deploy action to App/Deployment API surface#1

Open
kristof-siket wants to merge 1 commit into
mainfrom
feat/migrate-to-apps-deployments-sdk
Open

feat: migrate deploy action to App/Deployment API surface#1
kristof-siket wants to merge 1 commit into
mainfrom
feat/migrate-to-apps-deployments-sdk

Conversation

@kristof-siket

Copy link
Copy Markdown

Why

prisma/compute-deploy is one of the last callers of the deprecated Prisma Compute Management API endpoints (/v1/compute-services* + /v1/versions*), which are slated for removal (domain-model rename, Linear PRS-90 / milestone M6-PR4). Axiom traffic analysis traced the residual deprecated traffic to this action: it pinned @prisma/compute-sdk@0.16.0, which calls only the old surface. The action's own smoke workflows (smoke-deploy-default, smoke-deploy-prebuilt) plus the demo deploys that consume it keep the old endpoints warm.

project-compute's SDK itself was already migrated to /v1/apps + /v1/deployments (project-compute #98) and published as @prisma/compute-sdk@0.34.0. This PR just moves the action onto that release.

What changed

  • Deps: @prisma/compute-sdk 0.16.0 → 0.34.0, @prisma/management-api-sdk 1.24.0 → 1.49.0.
  • scripts/deploy.ts: updated to the renamed SDK API (breaking rename in #98):
    • deploy({ serviceId, destroyOldVersion })deploy({ appId, destroyOldDeployment })
    • progress callbacks onVersionCreated / onOldVersion* / onCleanupDanglingVersion*onDeploymentCreated / onOldDeployment* / onCleanupDanglingDeployment*
    • result fields { versionId, versionEndpointDomain, serviceEndpointDomain }{ deploymentId, deploymentEndpointDomain, appEndpointDomain }

Behind the scenes this switches the calls from /v1/compute-services* + /v1/versions* to /v1/apps* + /v1/deployments*.

Public contract preserved

The action's inputs (compute-service-id, destroy-old-version, …) and outputs (version-id, version-endpoint-domain, service-endpoint-domain) are intentionally unchanged, so no consumer workflow needs edits. The existing cps_-prefixed service ids are accepted as appId. Renaming the action's own input/output vocabulary is out of scope for this change.

Verification

  • bun run check:types — clean (the SDK is fully typed end-to-end, so a green typecheck confirms every method/callback/field name matches the new surface).
  • bunx biome check scripts/deploy.ts — clean.
  • Shell scripts (create-deployment.sh, update-deployment-status.sh) only call api.github.com; deploy.ts was the sole Management API caller.
  • End-to-end deploy is exercised by the existing smoke-deploy-* workflows on merge to main.

🤖 Generated with Claude Code

Bump @prisma/compute-sdk 0.16.0 -> 0.34.0 and @prisma/management-api-sdk
1.24.0 -> 1.49.0, and update scripts/deploy.ts to the renamed
App/Deployment SDK (appId, destroyOldDeployment, onDeployment*/
onOldDeployment* callbacks, deploymentId/deploymentEndpointDomain/
appEndpointDomain result fields).

The pinned 0.16.0 SDK called the deprecated /v1/compute-services and
/v1/versions Management API endpoints; 0.34.0 calls /v1/apps and
/v1/deployments. This drains the action's remaining traffic off the
deprecated surface ahead of its removal.

The action's public inputs and outputs (compute-service-id,
destroy-old-version, version-id, version-endpoint-domain,
service-endpoint-domain) are unchanged; only the SDK calls behind them
move to the new surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant