ruanwenjun opened a new pull request, #18228:
URL: https://github.com/apache/dolphinscheduler/pull/18228

   <!--Thanks very much for contributing to Apache DolphinScheduler, we are 
happy that you want to help us improve DolphinScheduler! -->
   
   ## Was this PR generated or assisted by AI?
   
   YES, ops 4.7
   
   ## Purpose of the pull request
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   ## Brief change log
   
   Refactor 3 WorkerGroupService methods from Map<String, Object> to typed 
return / void + ServiceException, with cascading updates to the controller and 
unit test:
   
   - queryAllGroup(User): List<String>
   - deleteWorkerGroupById(User, Integer): void
   - getWorkerAddressList(): Set<String>
   
   The private checkWorkerGroupDependencies(WorkerGroup, Map) helper now throws 
ServiceException with WORKER_GROUP_DEPENDENT_TASK/SCHEDULER/ ENVIRONMENT_EXISTS 
instead of mutating a result map and returning a boolean. The orphaned no-op 
invocation in saveWorkerGroup (which mutated a local map that was never read) 
is removed to preserve byte-for-byte behavior — its rename-with-dependencies 
guard was already inert.
   
   HTTP wire format is preserved: ApiExceptionHandler converts ServiceException 
to the same Result(code, msg) shape that BaseController.returnDataList(map) 
produced; success paths use Result.success(data) matching the prior JSON body 
byte-for-byte.
   
   No Py4J impact: WorkerGroupService is not exposed via PythonGateway.
   
   Part of the migration series tracked by #18224.
   
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   This pull request is code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please 
describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   <!--*(example:)*
   - *Added dolphinscheduler-dao tests for end-to-end.*
   - *Added CronUtilsTest to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   (or)
   
   ## Pull Request Notice
   [Pull Request 
Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
   
   If your pull request contains incompatible change, you should also add it to 
`docs/docs/en/guide/upgrade/incompatible.md`
   


-- 
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]

Reply via email to