njnu-seafish commented on code in PR #18293:
URL:
https://github.com/apache/dolphinscheduler/pull/18293#discussion_r3307842899
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProjectWorkerGroupRelationService.java:
##########
@@ -43,4 +44,22 @@ public interface ProjectWorkerGroupRelationService {
*/
List<ProjectWorkerGroup> queryAssignedWorkerGroupsByProject(User
loginUser, Long projectCode);
+ /**
+ * check if worker group is assigned to project
+ *
+ * @param projectCode project code
+ * @param workerGroup worker group name
+ * @return true if worker group is assigned to project
+ */
+ boolean isWorkerGroupAssignedToProject(Long projectCode, String
workerGroup);
+
+ /**
+ * validate worker groups are all assigned to project
+ *
+ * @param projectCode project code
+ * @param workerGroups worker group names to validate
+ * @throws ServiceException if any worker group is not assigned
+ */
+ void validateWorkerGroupsAssignedToProject(Long projectCode, List<String>
workerGroups);
Review Comment:
> duplicated with `WorkerGroupValidator`
Okay, I will unify the logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]