zhyyyq opened a new issue, #17365:
URL: https://github.com/apache/dolphinscheduler/issues/17365

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   log said that the branch is empty, but it did have a branch
   [ERROR] 2025-07-24 15:51:24.832 +0800 - Task execute failed, due to meet an 
exception
   java.lang.IllegalArgumentException: The branch is empty, please check the 
switch task configuration
        at 
org.apache.dolphinscheduler.server.master.runner.task.switchtask.SwitchLogicTask.checkIfBranchExist(SwitchLogicTask.java:130)
        at 
org.apache.dolphinscheduler.server.master.runner.task.switchtask.SwitchLogicTask.handle(SwitchLogicTask.java:78)
        at 
org.apache.dolphinscheduler.server.master.runner.execute.SyncMasterTaskExecutor.executeTask(SyncMasterTaskExecutor.java:44)
        at 
org.apache.dolphinscheduler.server.master.runner.execute.MasterTaskExecutor.run(MasterTaskExecutor.java:110)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   
   <img width="803" height="425" alt="Image" 
src="https://github.com/user-attachments/assets/b5dd6a2c-dd1c-47da-8c5b-e94b8dc124b7";
 />
   
   <img width="652" height="490" alt="Image" 
src="https://github.com/user-attachments/assets/ead32da0-ca1a-457d-9cf6-3b808afab77e";
 />
   
   ### What you expected to happen
   
   no error
   
   ### How to reproduce
   
   <img width="1239" height="722" alt="Image" 
src="https://github.com/user-attachments/assets/502ea5f1-945f-40e4-9d58-5c3470818c7f";
 />
   
   
   
taskDefinitionJson=%5B%7B%22id%22%3A316%2C%22code%22%3A147360740434496%2C%22name%22%3A%22shell1%22%2C%22version%22%3A1%2C%22description%22%3A%22%22%2C%22projectCode%22%3A147350314144320%2C%22userId%22%3A1%2C%22taskType%22%3A%22SHELL%22%2C%22taskParams%22%3A%7B%22localParams%22%3A%5B%5D%2C%22rawScript%22%3A%22echo%201%22%2C%22resourceList%22%3A%5B%5D%7D%2C%22taskParamList%22%3A%5B%5D%2C%22taskParamMap%22%3Anull%2C%22flag%22%3A%22YES%22%2C%22isCache%22%3A%22NO%22%2C%22taskPriority%22%3A%22MEDIUM%22%2C%22userName%22%3Anull%2C%22projectName%22%3Anull%2C%22workerGroup%22%3A%22default%22%2C%22environmentCode%22%3A146747309992640%2C%22failRetryTimes%22%3A0%2C%22failRetryInterval%22%3A1%2C%22timeoutFlag%22%3A%22CLOSE%22%2C%22timeoutNotifyStrategy%22%3Anull%2C%22timeout%22%3A0%2C%22delayTime%22%3A0%2C%22resourceIds%22%3Anull%2C%22createTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22updateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22modifyBy%22%3Anull%2C%22taskGroupId%22%3A0%2C%22taskGrou
 
pPriority%22%3A0%2C%22cpuQuota%22%3A-1%2C%22memoryMax%22%3A-1%2C%22taskExecuteType%22%3A%22BATCH%22%2C%22operator%22%3A1%2C%22operateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22dependence%22%3A%22%22%7D%2C%7B%22id%22%3A317%2C%22code%22%3A147360756642368%2C%22name%22%3A%22sh2%22%2C%22version%22%3A1%2C%22description%22%3A%22%22%2C%22projectCode%22%3A147350314144320%2C%22userId%22%3A1%2C%22taskType%22%3A%22SHELL%22%2C%22taskParams%22%3A%7B%22localParams%22%3A%5B%5D%2C%22rawScript%22%3A%22echo%202%22%2C%22resourceList%22%3A%5B%5D%7D%2C%22taskParamList%22%3A%5B%5D%2C%22taskParamMap%22%3Anull%2C%22flag%22%3A%22YES%22%2C%22isCache%22%3A%22NO%22%2C%22taskPriority%22%3A%22MEDIUM%22%2C%22userName%22%3Anull%2C%22projectName%22%3Anull%2C%22workerGroup%22%3A%22default%22%2C%22environmentCode%22%3A146747309992640%2C%22failRetryTimes%22%3A0%2C%22failRetryInterval%22%3A1%2C%22timeoutFlag%22%3A%22CLOSE%22%2C%22timeoutNotifyStrategy%22%3Anull%2C%22timeout%22%3A0%2C%22delayTime%22%3A0%2C%22resource
 
Ids%22%3Anull%2C%22createTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22updateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22modifyBy%22%3Anull%2C%22taskGroupId%22%3A0%2C%22taskGroupPriority%22%3A0%2C%22cpuQuota%22%3A-1%2C%22memoryMax%22%3A-1%2C%22taskExecuteType%22%3A%22BATCH%22%2C%22operator%22%3A1%2C%22operateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22dependence%22%3A%22%22%7D%2C%7B%22id%22%3A318%2C%22code%22%3A1753342811910%2C%22name%22%3A%22SQL%22%2C%22version%22%3A2%2C%22description%22%3A%22%22%2C%22projectCode%22%3A147350314144320%2C%22userId%22%3A1%2C%22taskType%22%3A%22SQL%22%2C%22taskParams%22%3A%7B%22localParams%22%3A%5B%7B%22prop%22%3A%22status%22%2C%22direct%22%3A%22OUT%22%2C%22type%22%3A%22VARCHAR%22%2C%22value%22%3A%22%22%7D%5D%2C%22resourceList%22%3A%5B%5D%2C%22type%22%3A%22POSTGRESQL%22%2C%22datasource%22%3A2%2C%22sql%22%3A%22select%20status%20from%20test_task%20where%20task_type%20%3D%20%27ETL_1%27%20and%20run_date%20%3D%20TO_DATE%28%27%24%7Bsystem.biz.curdate%
 
7D%27%2C%20%27YYYYMMDD%27%29%22%2C%22sqlType%22%3A%220%22%2C%22preStatements%22%3A%5B%5D%2C%22postStatements%22%3A%5B%5D%2C%22displayRows%22%3A10%7D%2C%22taskParamList%22%3A%5B%7B%22prop%22%3A%22status%22%2C%22direct%22%3A%22OUT%22%2C%22type%22%3A%22VARCHAR%22%2C%22value%22%3A%22%22%7D%5D%2C%22taskParamMap%22%3A%7B%22status%22%3A%22%22%7D%2C%22flag%22%3A%22YES%22%2C%22isCache%22%3A%22NO%22%2C%22taskPriority%22%3A%22MEDIUM%22%2C%22userName%22%3Anull%2C%22projectName%22%3Anull%2C%22workerGroup%22%3A%22default%22%2C%22environmentCode%22%3A-1%2C%22failRetryTimes%22%3A0%2C%22failRetryInterval%22%3A1%2C%22timeoutFlag%22%3A%22CLOSE%22%2C%22timeoutNotifyStrategy%22%3Anull%2C%22timeout%22%3A0%2C%22delayTime%22%3A0%2C%22resourceIds%22%3Anull%2C%22createTime%22%3A%222025-07-24%2015%3A40%3A11%22%2C%22updateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22modifyBy%22%3Anull%2C%22taskGroupId%22%3A0%2C%22taskGroupPriority%22%3A0%2C%22cpuQuota%22%3A-1%2C%22memoryMax%22%3A-1%2C%22taskExecuteType%22%3A
 
%22BATCH%22%2C%22operator%22%3A1%2C%22operateTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22dependence%22%3A%22%22%7D%2C%7B%22id%22%3A319%2C%22code%22%3A147360726458944%2C%22name%22%3A%22switch%22%2C%22version%22%3A2%2C%22description%22%3A%22%22%2C%22projectCode%22%3A147350314144320%2C%22userId%22%3A1%2C%22taskType%22%3A%22SWITCH%22%2C%22taskParams%22%3A%7B%22localParams%22%3A%5B%5D%2C%22rawScript%22%3A%22%22%2C%22resourceList%22%3A%5B%5D%2C%22switchResult%22%3A%7B%22dependTaskList%22%3A%5B%7B%22condition%22%3A%22%24%7Bstatus%7D%20%3D%3D%20%27done%27%22%2C%22nextNode%22%3A147360740434496%7D%5D%2C%22nextNode%22%3A147360756642368%7D%7D%2C%22taskParamList%22%3A%5B%5D%2C%22taskParamMap%22%3Anull%2C%22flag%22%3A%22YES%22%2C%22isCache%22%3A%22NO%22%2C%22taskPriority%22%3A%22MEDIUM%22%2C%22userName%22%3Anull%2C%22projectName%22%3Anull%2C%22workerGroup%22%3A%22default%22%2C%22environmentCode%22%3A146747309992640%2C%22failRetryTimes%22%3A0%2C%22failRetryInterval%22%3A1%2C%22timeoutFlag%22%3A
 
%22CLOSE%22%2C%22timeoutNotifyStrategy%22%3Anull%2C%22timeout%22%3A0%2C%22delayTime%22%3A0%2C%22resourceIds%22%3Anull%2C%22createTime%22%3A%222025-07-24%2015%3A45%3A50%22%2C%22updateTime%22%3A%222025-07-24%2015%3A49%3A49%22%2C%22modifyBy%22%3Anull%2C%22taskGroupId%22%3A0%2C%22taskGroupPriority%22%3A0%2C%22cpuQuota%22%3A-1%2C%22memoryMax%22%3A-1%2C%22taskExecuteType%22%3A%22BATCH%22%2C%22operator%22%3A1%2C%22operateTime%22%3A%222025-07-24%2015%3A49%3A49%22%2C%22dependence%22%3A%22%22%7D%5D&taskRelationJson=%5B%7B%22name%22%3A%22%22%2C%22preTaskCode%22%3A0%2C%22preTaskVersion%22%3A0%2C%22postTaskCode%22%3A1753342811910%2C%22postTaskVersion%22%3A2%2C%22conditionType%22%3A%22NONE%22%2C%22conditionParams%22%3A%7B%7D%7D%2C%7B%22name%22%3A%22%22%2C%22preTaskCode%22%3A147360726458944%2C%22preTaskVersion%22%3A2%2C%22postTaskCode%22%3A147360740434496%2C%22postTaskVersion%22%3A1%2C%22conditionType%22%3A%22NONE%22%2C%22conditionParams%22%3A%7B%7D%7D%2C%7B%22name%22%3A%22%22%2C%22preTaskCode%22%
 
3A147360726458944%2C%22preTaskVersion%22%3A2%2C%22postTaskCode%22%3A147360756642368%2C%22postTaskVersion%22%3A1%2C%22conditionType%22%3A%22NONE%22%2C%22conditionParams%22%3A%7B%7D%7D%2C%7B%22name%22%3A%22%22%2C%22preTaskCode%22%3A1753342811910%2C%22preTaskVersion%22%3A2%2C%22postTaskCode%22%3A147360726458944%2C%22postTaskVersion%22%3A2%2C%22conditionType%22%3A%22NONE%22%2C%22conditionParams%22%3A%7B%7D%7D%5D&locations=%5B%7B%22taskCode%22%3A147360740434496%2C%22x%22%3A30%2C%22y%22%3A330%7D%2C%7B%22taskCode%22%3A147360756642368%2C%22x%22%3A289%2C%22y%22%3A330%7D%2C%7B%22taskCode%22%3A1753342811910%2C%22x%22%3A90%2C%22y%22%3A18%7D%2C%7B%22taskCode%22%3A147360726458944%2C%22x%22%3A90%2C%22y%22%3A157%7D%5D&name=my-workflow&executionType=PARALLEL&description=&globalParams=%5B%5D&timeout=0&releaseState=OFFLINE
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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