Skip to content

Commit

Permalink
If a deployment is already deployed, just return the deployment so th…
Browse files Browse the repository at this point in the history
…e request succeeds (#1639)
  • Loading branch information
ericallam authored Jan 24, 2025
1 parent ab6e6af commit 246eb43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/webapp/app/v3/services/finalizeDeploymentV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export class FinalizeDeploymentV2Service extends BaseService {
throw new ServiceValidationError("Worker deployment does not have a worker");
}

if (deployment.status === "DEPLOYED") {
logger.debug("Worker deployment is already deployed", { id });

return deployment;
}

if (deployment.status !== "DEPLOYING") {
logger.error("Worker deployment is not in DEPLOYING status", { id });
throw new ServiceValidationError("Worker deployment is not in DEPLOYING status");
Expand Down

0 comments on commit 246eb43

Please sign in to comment.