File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
apps/webapp/app/v3/services Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ export class ReplayTaskRunService extends BaseService {
3737 taskRunFriendlyId : existingTaskRun . friendlyId ,
3838 } ) ;
3939
40+ const existingEnvironment = await this . _prisma . runtimeEnvironment . findFirstOrThrow ( {
41+ where : {
42+ id : existingTaskRun . runtimeEnvironmentId ,
43+ } ,
44+ select : {
45+ id : true ,
46+ type : true ,
47+ } ,
48+ } ) ;
49+
4050 const payloadPacket = await this . overrideExistingPayloadPacket (
4151 existingTaskRun ,
4252 overrideOptions . payload
@@ -48,6 +58,11 @@ export class ReplayTaskRunService extends BaseService {
4858 const payloadType = payloadPacket . dataType ;
4959 const metadata = overrideOptions . metadata ?? ( await this . getExistingMetadata ( existingTaskRun ) ) ;
5060 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 ;
5166
5267 try {
5368 const taskQueue = await this . _prisma . taskQueue . findFirst ( {
@@ -92,7 +107,7 @@ export class ReplayTaskRunService extends BaseService {
92107 lockToVersion :
93108 overrideOptions . version === "latest" ? undefined : overrideOptions . version ,
94109 bulkActionId : overrideOptions ?. bulkActionId ,
95- region : existingTaskRun . workerQueue ,
110+ region,
96111 } ,
97112 } ,
98113 {
You can’t perform that action at this time.
0 commit comments