From 047d7c34927ee4a48f9d5406b109d0f59ab2b8a9 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 20 Aug 2025 22:42:04 +0100 Subject: [PATCH] When replaying a v3 run on v4, don't pass the region --- apps/webapp/app/v3/services/replayTaskRun.server.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/webapp/app/v3/services/replayTaskRun.server.ts b/apps/webapp/app/v3/services/replayTaskRun.server.ts index 104baa90b2..71b1028bc1 100644 --- a/apps/webapp/app/v3/services/replayTaskRun.server.ts +++ b/apps/webapp/app/v3/services/replayTaskRun.server.ts @@ -58,11 +58,12 @@ export class ReplayTaskRunService extends BaseService { const payloadType = payloadPacket.dataType; const metadata = overrideOptions.metadata ?? (await this.getExistingMetadata(existingTaskRun)); const tags = overrideOptions.tags ?? existingTaskRun.runTags; - // Only use the region from the existing task if neither environment is a development environment - const region = - existingEnvironment.type === "DEVELOPMENT" || authenticatedEnvironment.type === "DEVELOPMENT" - ? undefined - : existingTaskRun.workerQueue; + // Only use the region from the existing run if V2 engine and neither environment is dev + const ignoreRegion = + existingTaskRun.engine === "V1" || + existingEnvironment.type === "DEVELOPMENT" || + authenticatedEnvironment.type === "DEVELOPMENT"; + const region = ignoreRegion ? undefined : existingTaskRun.workerQueue; try { const taskQueue = await this._prisma.taskQueue.findFirst({