Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

What is this PR about?

Deploy endpoints now return a jobId that can be used to track deployment status. Previously, endpoints only confirmed the job was queued without providing an identifier for status queries.

Changes:

  • Added jobId field to DeploymentJob type
  • Modified compose.deploy, compose.redeploy, application.deploy, and application.redeploy to return { jobId }
  • Updated deployment creation services to use jobId as deploymentId when provided
  • Applied same pattern to webhook endpoints for consistency

Usage:

// Deploy and receive tracking ID
const { jobId } = await trpc.compose.deploy.mutate({
  composeId: "my-compose",
  title: "Deploy from CI"
});

// Query deployment status using the jobId
const deployments = await trpc.deployment.allByCompose.query({
  composeId: "my-compose"
});
const deployment = deployments.find(d => d.deploymentId === jobId);
console.log(deployment.status); // "running" | "done" | "error" | "cancelled"

Checklist

Before submitting this PR, please make sure that:

Issues related (if applicable)

Screenshots (if applicable)

Original prompt

This section details on the original issue you should resolve

<issue_title>compose.deploy usable ID</issue_title>
<issue_description>### What problem will this feature address?

Right now, when we deploy, we only know if the deployment job was added to the queue. We cannot get the status of the deployment afterwards to see if it succeeded in a pipeline.

return { success: true, message: "Deployment queued" };

Describe the solution you'd like

Even if we can't get a deployment id since the queue creates it (didn't check), can we create a special ID in the deployment job object that we can get in the deployment.allByCompose items?

Describe alternatives you've considered

Currently, we're gonna use the status and the commit id in the description to check if it succeeded, but it isn't a very good thing with multiple deployments at once.

Additional context

No response

Will you send a PR to implement it?

Maybe, need help</issue_description>

Comments on the Issue (you are @copilot in this section)


���� You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 31, 2025 06:04
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Copilot AI changed the title [WIP] Add usable ID for deployment jobs Dec 31, 2025
Copilot AI requested a review from Siumauricio December 31, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants