spring-cloud / spring-cloud-dataflow

A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes
https://dataflow.spring.io
Apache License 2.0
1.09k stars 579 forks source link

Serialize Job Parameters to the command Line Arguments on Job Restarts per Batch Standards #5850

Open cppwfs opened 4 days ago

cppwfs commented 4 days ago

What this PR is trying to do

Currently Spring Batch allows users to specify 2 formats for accepting Job parameters via the command line. This PR allows SCDF to use both formats, where before it was only using the default.

This PR is initially broken up into 4 commits

  1. Updates DefaultJobService to accept dataflow global configuration for which format should be use as its default. a. Update the controller so that user can specify a different format for a specific launch instead of using dataflow's configured default b. Update the model so if the user clicks the link for a restart it will use dataflow's configured default. c. Notice some of the old tests had to be updated because the encoder provided by batch provides the isIdentifying field.
  2. Update the restful docs so can demonstrate the use of useJsonJobParameters
  3. Update shell and Data flow client API to allow users to specify a useJsonJobParameters if necessary. a. There are no tests for shell nor Data flow client yet. This is because @EnableDataflowServer needs to be fixed first.
    1. Polish the PR to cleanup some things I missed or noticed during review.