Skip to content

Commit f13c621

Browse files
committed
rename pre-pull image to deployment
1 parent c5c9619 commit f13c621

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

apps/kubernetes-provider/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
TaskOperations,
55
TaskOperationsCreateOptions,
66
TaskOperationsIndexOptions,
7-
TaskOperationsPrePullImageOptions,
7+
TaskOperationsPrePullDeploymentOptions,
88
TaskOperationsRestoreOptions,
99
} from "@trigger.dev/core-apps/provider";
1010
import { SimpleLogger } from "@trigger.dev/core-apps/logger";
@@ -315,7 +315,7 @@ class KubernetesTaskOperations implements TaskOperations {
315315
await this.#getPod(opts.runId, this.#namespace);
316316
}
317317

318-
async prePullImage(opts: TaskOperationsPrePullImageOptions) {
318+
async prePullDeployment(opts: TaskOperationsPrePullDeploymentOptions) {
319319
const metaName = this.#getPrePullContainerName(opts.shortCode);
320320

321321
const metaLabels = {
@@ -474,7 +474,7 @@ class KubernetesTaskOperations implements TaskOperations {
474474
| TaskOperationsIndexOptions
475475
| TaskOperationsCreateOptions
476476
| TaskOperationsRestoreOptions
477-
| TaskOperationsPrePullImageOptions
477+
| TaskOperationsPrePullDeploymentOptions
478478
): Record<string, string> {
479479
return {
480480
env: opts.envId,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class CreateDeployedBackgroundWorkerService extends BaseService {
134134
}
135135

136136
if (deployment.imageReference) {
137-
socketIo.providerNamespace.emit("PRE_PULL_IMAGE", {
137+
socketIo.providerNamespace.emit("PRE_PULL_DEPLOYMENT", {
138138
version: "v1",
139139
imageRef: deployment.imageReference,
140140
shortCode: deployment.shortCode,

packages/core-apps/src/provider.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export interface TaskOperationsRestoreOptions {
6464
checkpointId: string;
6565
}
6666

67-
export interface TaskOperationsPrePullImageOptions {
67+
export interface TaskOperationsPrePullDeploymentOptions {
6868
shortCode: string;
6969
imageRef: string;
7070
// identifiers
@@ -87,7 +87,7 @@ export interface TaskOperations {
8787
delete?: (...args: any[]) => Promise<any>;
8888
get?: (...args: any[]) => Promise<any>;
8989

90-
prePullImage?: (opts: TaskOperationsPrePullImageOptions) => Promise<any>;
90+
prePullDeployment?: (opts: TaskOperationsPrePullDeploymentOptions) => Promise<any>;
9191
}
9292

9393
type ProviderShellOptions = {
@@ -290,14 +290,14 @@ export class ProviderShell implements Provider {
290290
logger.error("restore failed", error);
291291
}
292292
},
293-
PRE_PULL_IMAGE: async (message) => {
294-
if (!this.tasks.prePullImage) {
295-
logger.debug("prePullImage not implemented", message);
293+
PRE_PULL_DEPLOYMENT: async (message) => {
294+
if (!this.tasks.prePullDeployment) {
295+
logger.debug("prePullDeployment not implemented", message);
296296
return;
297297
}
298298

299299
try {
300-
await this.tasks.prePullImage({
300+
await this.tasks.prePullDeployment({
301301
shortCode: message.shortCode,
302302
imageRef: message.imageRef,
303303
// identifiers
@@ -308,7 +308,7 @@ export class ProviderShell implements Provider {
308308
deploymentId: message.deploymentId,
309309
});
310310
} catch (error) {
311-
logger.error("prePullImage failed", error);
311+
logger.error("prePullDeployment failed", error);
312312
}
313313
},
314314
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export const PlatformToProviderMessages = {
367367
runId: z.string(),
368368
}),
369369
},
370-
PRE_PULL_IMAGE: {
370+
PRE_PULL_DEPLOYMENT: {
371371
message: z.object({
372372
version: z.literal("v1").default("v1"),
373373
imageRef: z.string(),

0 commit comments

Comments
 (0)