You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "YetAlpha (via GitHub)" <gi...@apache.org> on 2024/03/26 08:58:55 UTC

[I] [Bug] [java_task] Java type task cannot read variables [dolphinscheduler]

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

   ### 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 I want to use variables in the java node, the configuration does not take effect. Checking the running log did not replace ${var} with a specific value.
   
   The shell1 node passes the set_val variable value, and shell2 and java1 use the set_var variable; during actual operation, shell2 can read the set_var variable correctly, but java1 cannot.
   
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/aafafd6e-abfd-45af-b217-9b19f44b6a72)
   
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/1ce08582-be7e-4bae-aeb2-4eeaec7d1b34)
   
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/8b26b603-4709-42bf-b188-13f0e506698b)
   
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/f0668fac-67af-4a85-8d9a-161bd5f37850)
   
   
   ### What you expected to happen
   
   I want java1's mainArgs to be replaced with the real value of set_var
   
   ### How to reproduce
   
   It can be reproduced as described above
   
   ### Anything else
   
   I found by looking at the source code that shellTask set properties when constructing IShellInterceptorBuilder, but JavaTask did not. Finally, when producing runShell, the propertyMap is empty.
   ShellTask:
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/8df09202-ba17-4fb7-9f42-8dd801e9e385)
   
   JavaTask:
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/3f97ab94-bb96-4293-b016-7c7ec2a74c0e)
   
   shellBody:
   ![image](https://github.com/apache/dolphinscheduler/assets/7709518/9b72ecd6-d07a-4730-a90d-4aa2d8b090e8)
   
   
   
   ### Version
   
   3.2.x
   
   ### 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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [java_task] Java type task cannot read variables [dolphinscheduler]

Posted by "jxdhuochai (via GitHub)" <gi...@apache.org>.
jxdhuochai commented on issue #15768:
URL: https://github.com/apache/dolphinscheduler/issues/15768#issuecomment-2024313676

   JavaTask  line 131 add .properties(ParameterUtils.convert(taskRequest.getPrepareParamsMap())) 


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org