gaoyunhaii opened a new pull request, #21736:
URL: https://github.com/apache/flink/pull/21736

   ## What is the purpose of the change
   
   This PR refactors the state migration tests so that when cutting branch, we 
need only add new version and could generates the states of stale version 
automatically. 
   
   In general, there are two options:
   1. Similar to the configuration document generator, we could have a module 
that depends on all the modules containing migration tests and run generation 
with this module. 
   2. Introduce tools to generate states, and each module config the tools 
separately. 
   
   We finally choose the option 2. This is because Maven have a bad support for 
depending on the tests classes of other modules, we could only use the 
`test-jar`, which do not support transitive dependency and make it hard to 
manage these transitive dependencies. 
   
   Except for the generating, during the refactoring we also make each 
migration tests use a dynamic version lists: `[start, FlinkVersion.last()]`, 
which free us from manually change the list on cutting branch for each version. 
   
   ## Brief change log
   - Introduce a new framework of migration tests. 
   - Introduce tools to scan the test classes of the configured module and 
generating snapshots.
   - Refactor existing tests based on the new framework. 
   
   ## Verifying this change
   
   Manually verified the process of 
   - Add version 1.18 to `FlinkVersion`.
   - Generating states automatically via `mvn clean package 
-Pgenerate-snapshots -Dgenerate.version=1.17 -nsu -DskipRat -Dcheckstyle.skip 
-Drat.ignoreErrors=true -DspotlessFiles=ineffective -Dfast -DskipTests -pl 
flink-core -am`
   - Run the existing tests and verified the tests including the ones against 
1.17 are all executed successfully. 
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **no**
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **no**
     - The serializers: **no**
     - The runtime per-record code paths (performance sensitive): **no**
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: **no**
     - The S3 file system connector: **no**
   
   ## Documentation
   
     - Does this pull request introduce a new feature? **Yes**
     - If yes, how is the feature documented? **docs**
   


-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to