zhuang1125 opened a new issue, #16445: URL: https://github.com/apache/dolphinscheduler/issues/16445
### 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 this code may be error when get ResourceName: ``` 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().replaceFirst(".*:", "")); }); } return args; } ``` should be change to below to resolve: ``` 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)); String path = resourceInfo.getResourceName(); String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path) .getResourceAbsolutePathInLocal(); args.add(absolutePath); // args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", "")); }); } return args; } ``` ### What you expected to happen this code may be error when get ResourceName: ``` 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().replaceFirst(".*:", "")); }); } return args; } ``` should be change to below to resolve: ``` 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)); String path = resourceInfo.getResourceName(); String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path) .getResourceAbsolutePathInLocal(); args.add(absolutePath); // args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", "")); }); } return args; } ``` ### How to reproduce this code may be error when get ResourceName: ``` 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().replaceFirst(".*:", "")); }); } return args; } ``` should be change to below to resolve: ``` 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)); String path = resourceInfo.getResourceName(); String absolutePath= taskExecutionContext.getResourceContext().getResourceItem(path) .getResourceAbsolutePathInLocal(); args.add(absolutePath); // args.add("/" + resourceInfo.getResourceName().replaceFirst(".*:", "")); }); } return args; } ``` ### Anything else my env is docker with minio as resourcemanager to get resource ### 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]
