From 6bf92f8824222432bec336b076f08aa070b0580f Mon Sep 17 00:00:00 2001 From: Brady Date: Fri, 18 Oct 2024 13:43:17 -0400 Subject: [PATCH] Adding isolationGroups --- .../conductor/core/execution/mapper/ForkJoinTaskMapper.java | 5 +++++ .../conductor/core/execution/mapper/JoinTaskMapper.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinTaskMapper.java b/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinTaskMapper.java index aefabb0a1..9bc9aaa24 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinTaskMapper.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinTaskMapper.java @@ -15,6 +15,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -78,6 +79,10 @@ public List getMappedTasks(TaskMapperContext taskMapperContext) forkTask.setEndTime(epochMillis); forkTask.setInputData(taskInput); forkTask.setStatus(TaskModel.Status.COMPLETED); + if (Objects.nonNull(taskMapperContext.getTaskDefinition())) { + forkTask.setIsolationGroupId( + taskMapperContext.getTaskDefinition().getIsolationGroupId()); + } tasksToBeScheduled.add(forkTask); List> forkTasks = workflowTask.getForkTasks(); diff --git a/core/src/main/java/com/netflix/conductor/core/execution/mapper/JoinTaskMapper.java b/core/src/main/java/com/netflix/conductor/core/execution/mapper/JoinTaskMapper.java index 6ae3adb1e..ee027df57 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/mapper/JoinTaskMapper.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/mapper/JoinTaskMapper.java @@ -15,6 +15,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -65,6 +66,10 @@ public List getMappedTasks(TaskMapperContext taskMapperContext) { joinTask.setStartTime(System.currentTimeMillis()); joinTask.setInputData(joinInput); joinTask.setStatus(TaskModel.Status.IN_PROGRESS); + if (Objects.nonNull(taskMapperContext.getTaskDefinition())) { + joinTask.setIsolationGroupId( + taskMapperContext.getTaskDefinition().getIsolationGroupId()); + } return List.of(joinTask); }