Zhile opened a new pull request, #4451:
URL: https://github.com/apache/flink-cdc/pull/4451

   ## What is the purpose of the change
   
   Fix [FLINK-40005]: in **application mode**, `CliExecutor.main` fails to 
start a YAML pipeline with `Missing required field "source" in top-level 
configuration`.
   
   `args[0]` is the pipeline definition **file path**, but it was passed to 
`YamlPipelineDefinitionParser.parse(String, Configuration)`, which treats its 
`String` argument as YAML **content**. So the path string itself is parsed as 
YAML, producing a document without `source`/`sink`, which fails validation. 
Session mode works because `CliFrontend` reads the file content before parsing.
   
   Regression introduced by #3643 (FLINK-35360, *Support Yarn application mode 
for yaml job*).
   
   ## Brief change log
   
   - `CliExecutor.main` now reads the pipeline definition file content 
referenced by `args[0]` and parses the **content**.
   - Reads with the local JVM file API (`java.nio.file.Files.readAllBytes`) 
rather than Flink `FileSystem`, because the cluster default FileSystem is often 
S3 (checkpoints/HA on S3) and would not resolve the local file shipped next to 
the JobManager.
   
   ## Verifying this change
   
   - Added `CliExecutorTest` covering reading the pipeline definition from a 
local file path.
   - Manually verified on a Flink 1.20 Kubernetes Application-mode deployment 
(Flink Kubernetes Operator): the CDC pipeline starts and runs correctly; 
previously it failed with `Missing required field "source"`.
   
   ## Does this pull request potentially affect one of the following parts
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API: no
   - The serializers / checkpointing: no
   


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