Skip to content

Commit 1087e5e

Browse files
authored
When replaying a v3 run on v4, don't pass the region (#2431)
1 parent f086626 commit 1087e5e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ export class ReplayTaskRunService extends BaseService {
5858
const payloadType = payloadPacket.dataType;
5959
const metadata = overrideOptions.metadata ?? (await this.getExistingMetadata(existingTaskRun));
6060
const tags = overrideOptions.tags ?? existingTaskRun.runTags;
61-
// Only use the region from the existing task if neither environment is a development environment
62-
const region =
63-
existingEnvironment.type === "DEVELOPMENT" || authenticatedEnvironment.type === "DEVELOPMENT"
64-
? undefined
65-
: existingTaskRun.workerQueue;
61+
// Only use the region from the existing run if V2 engine and neither environment is dev
62+
const ignoreRegion =
63+
existingTaskRun.engine === "V1" ||
64+
existingEnvironment.type === "DEVELOPMENT" ||
65+
authenticatedEnvironment.type === "DEVELOPMENT";
66+
const region = ignoreRegion ? undefined : existingTaskRun.workerQueue;
6667

6768
try {
6869
const taskQueue = await this._prisma.taskQueue.findFirst({

0 commit comments

Comments
 (0)