Winn-bmt opened a new issue, #15156: URL: https://github.com/apache/dolphinscheduler/issues/15156
### 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 `将资源中心配置在本地时,对于上传到资源中的脚本文件,在执行seatunnel任务脚本,显示找不到脚本文件。因为在`dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java`文件的代码中,对ResourceName进行切分时,只切割了1个字符,代码如下 ``` protected List<String> buildOptions() throws Exception { List<String> args = new ArrayList<>(); if (BooleanUtils.isTrue(seatunnelParameters.getUseCustom())) { args.add(CONFIG_OPTIONS); args.add(buildCustomConfigCommand()); } else { seatunnelParameters.getResourceList().forEach(resourceInfo -> { args.add(CONFIG_OPTIONS); // TODO: Need further check for refactored resource center // TODO Currently resourceName is `/xxx.sh`, it has more `/` and needs to be optimized args.add(resourceInfo.getResourceName().substring(1)); }); } return args; } ``` 所以在初始化时,生成的脚本文件路径字符串前缀是`file:`,只切割掉1个字符,会导致文件路径包含`ile:` ,进而生成错误的路径字符串`ile:/tmp/dolphinscheduler` 所以实际应该切割掉5个字符。只切割掉一个字符会报如下的错误: <img width="769" alt="Snipaste_2023-11-13_15-54-11" src="https://github.com/apache/dolphinscheduler/assets/142102731/e1f09219-ede2-4b62-83a3-62b5c4cd4636"> <img width="769" alt="Snipaste_2023-11-13_15-55-40" src="https://github.com/apache/dolphinscheduler/assets/142102731/18a1605a-812c-47d2-821b-3a3d113b2d40"> 希望可以尽快处理一下,只需要在 `args.add(resourceInfo.getResourceName().substring(1));`改为`args.add(resourceInfo.getResourceName().substring(5));` 希望在下个版本中可以进行修复,谢谢! ### What you expected to happen <img width="769" alt="Snipaste_2023-11-13_15-54-11" src="https://github.com/apache/dolphinscheduler/assets/142102731/5a554970-82ee-4598-8923-56f5d52f8fda"> <img width="769" alt="Snipaste_2023-11-13_15-55-40" src="https://github.com/apache/dolphinscheduler/assets/142102731/31f3de37-521a-4885-83d9-0800b60d6c05"> ### How to reproduce 向资源中心上传seatunnel的作业文件,进行调度执行,会报错 找不到作业文件 ### Anything else _No response_ ### Version 3.2.x ### Are you willing to submit PR? - [X] 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]
