Fix pre-pulling of deployment images onto worker nodes (#1660)

* lint

* get pre-pull data from finalized deployment
This commit is contained in:
nicktrn
2025-02-04 10:07:07 +00:00
committed by GitHub
parent 42c5f4d9fa
commit 7fa45ad337
@@ -62,7 +62,7 @@ export class FinalizeDeploymentService extends BaseService {
data: {
status: "DEPLOYED",
deployedAt: new Date(),
imageReference: imageReference,
imageReference,
},
});
@@ -103,17 +103,17 @@ export class FinalizeDeploymentService extends BaseService {
logger.error("Failed to publish WORKER_CREATED event", { err });
}
if (deployment.imageReference) {
if (finalizedDeployment.imageReference) {
socketIo.providerNamespace.emit("PRE_PULL_DEPLOYMENT", {
version: "v1",
imageRef: deployment.imageReference,
shortCode: deployment.shortCode,
imageRef: finalizedDeployment.imageReference,
shortCode: finalizedDeployment.shortCode,
// identifiers
deploymentId: deployment.id,
deploymentId: finalizedDeployment.id,
envId: authenticatedEnv.id,
envType: authenticatedEnv.type,
orgId: authenticatedEnv.organizationId,
projectId: deployment.projectId,
projectId: finalizedDeployment.projectId,
});
}