Radeity commented on PR #13930:
URL: 
https://github.com/apache/dolphinscheduler/pull/13930#issuecomment-1517423242

   > 
   > You mean that if the user input is `command: ["echo", "'$SHELL'"]` the 
yaml will get
   > 
   > ```
   > - command:
   >     - echo
   >     - '''$SHELL'''
   > ```
   > 
   > which means the command string in yaml is not consistent with the user 
input ?
   > 
   > what about `command: ['echo', ''$SHELL'']` ? Since the doc of k8s use 
single quotes https://kubernetes.io/zh-cn/docs/concepts/workloads/pods/
   > 
   > I think test results need to be given to decide which way should we use to 
write the command array
   
   We can not use `['echo', ''$SHELL'']`, it will cause: `error: error parsing 
echo.yaml: error converting YAML to JSON: yaml: line 10: did not find expected 
',' or ']'`
   It's a constraint of yaml, if we want to define a string contains single 
quote, we have to wrap it with double quotes, you can see this answer: 
https://stackoverflow.com/questions/60061241/commands-passed-to-a-kubernetes-job-and-pod
   
   I still don't understand why we should give test results or example, if user 
can use command (yaml string) in their resource description yaml file before, 
they can use the same string in DS, either.
   
   > I think test results need to be given to decide which way should we use to 
write the command array
   
   Maybe, a simple answer is YAML way... 
   


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