Skip to content

Commit 5d7013b

Browse files
committed
Enable skipping image push during deployment finalization step
1 parent d90da7a commit 5d7013b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

apps/webapp/app/v3/services/finalizeDeploymentV2.server.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ export class FinalizeDeploymentV2Service extends BaseService {
7171
throw new ServiceValidationError("Worker deployment is not in DEPLOYING status");
7272
}
7373

74+
const finalizeService = new FinalizeDeploymentService();
75+
76+
if (body.skipPushToRegistry) {
77+
logger.debug("Skipping push to registry during deployment finalization", {
78+
deployment,
79+
});
80+
return await finalizeService.call(authenticatedEnv, id, body);
81+
}
82+
7483
const externalBuildData = deployment.externalBuildData
7584
? ExternalBuildData.safeParse(deployment.externalBuildData)
7685
: undefined;
@@ -134,7 +143,6 @@ export class FinalizeDeploymentV2Service extends BaseService {
134143
pushedImage: pushResult.image,
135144
});
136145

137-
const finalizeService = new FinalizeDeploymentService();
138146
const finalizedDeployment = await finalizeService.call(authenticatedEnv, id, body);
139147

140148
return finalizedDeployment;

packages/core/src/v3/schemas/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ export type StartDeploymentIndexingResponseBody = z.infer<
373373
export const FinalizeDeploymentRequestBody = z.object({
374374
skipPromotion: z.boolean().optional(),
375375
imageDigest: z.string().optional(),
376+
skipPushToRegistry: z.boolean().optional(),
376377
});
377378

378379
export type FinalizeDeploymentRequestBody = z.infer<typeof FinalizeDeploymentRequestBody>;

0 commit comments

Comments
 (0)