[ 
https://issues.apache.org/jira/browse/FLINK-30520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652767#comment-17652767
 ] 

Xintong Song commented on FLINK-30520:
--------------------------------------

[~tanjialiang],

This seems to be duplicating FLINK-15358, in which we decide to introduce 
proper standard yaml parsing (FLINK-23620). Unfortunately, the effort is staled 
at the moment.

As for the solution, I'd in favor of solving the whole yaml parsing issue at 
once, rather than patching one after another. But that's discussable. Either 
way, helps are welcomed and appreciated on this.

Let's keep the discussion in one place (FLINK-15358). I'm closing this 
duplicated ticket.

> Arguments contains with '#' will error split in loadYAMLResource
> ----------------------------------------------------------------
>
>                 Key: FLINK-30520
>                 URL: https://issues.apache.org/jira/browse/FLINK-30520
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>    Affects Versions: 1.16.0, 1.15.3
>            Reporter: tanjialiang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2022-12-28-17-13-25-351.png, 
> image-2022-12-28-17-13-38-337.png, image-2022-12-28-18-03-40-806.png
>
>
> When i submit a flink jar job in Kubernetes Application mode which main args 
> contains '#', it will be error split by 
> org.apache.flink.configuration.GlobalConfiguration#loadYAMLResource
>  
> such as i using flink-kubernetes-operator to submit a job in kubernetes 
> application mode
>  
> {code:java}
> apiVersion: flink.apache.org/v1beta1
> kind: FlinkDeployment
> metadata:
>   name: word-count
> spec:
>   image: apache/flink:1.16.0-scala_2.12-java8
>   flinkVersion: v1_16
>   flinkConfiguration:
>     taskmanager.numberOfTaskSlots: "1"
>   jobManager:
>     resource:
>       memory: "2048m"
>       cpu: 1
>   taskManager:
>     resource:
>       memory: "2048m"
>       cpu: 1
>   serviceAccount: flink
>   job:
>     jarURI: local:///opt/flink/examples/streaming/WordCount.jar
>     args:
>       - --output
>       - /tmp/1#.txt
>     parallelism: 2
>     upgradeMode: stateless
> {code}
>  
>  
> It will be error split when loading the flink-conf.yaml
> !image-2022-12-28-17-13-25-351.png!
>  
> And i enter to the jobmanager's pod to saw the flink-conf.yaml's program-args 
> is right
> !image-2022-12-28-17-13-38-337.png!
>  
> Maybe we should have a more strict validate for yaml comment? this is the 
> yaml editor by vim, we can see comment should be start with '#' in line or 
> comment start with ' #'
> !image-2022-12-28-18-03-40-806.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to