github-actions[bot] commented on issue #15156: URL: https://github.com/apache/dolphinscheduler/issues/15156#issuecomment-1807652413
### 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 `When the resource center is configured locally, for the script file uploaded to the resource, when executing the seatunnel task script, it shows that the script file cannot be found. Because in the code of the `dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java` file, when splitting the ResourceName, only One character is cut, the code is as follows ``` 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; } ``` Therefore, during initialization, the prefix of the generated script file path string is `file:`, and only one character is cut off, which will cause the file path to contain `ile:`, thus generating the wrong path string `ile:/tmp/dolphinscheduler ` So actually 5 characters should be cut off. Cutting off only one character will result in the following error: <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"> I hope it can be dealt with as soon as possible, just change `args.add(resourceInfo.getResourceName().substring(1));` to `args.add(resourceInfo.getResourceName().substring(5));` Hope it can be fixed in the next version, thank you! ### 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 Upload the seatunnel job file to the resource center for scheduling and execution. An error will be reported. The job file cannot be found. ### 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]
