Repository navigation
Conversation
…fic names Rename flink-cdc-flink1-compat to flink-cdc-flink/flink-cdc-flink-1.20 and flink-cdc-flink2-compat to flink-cdc-flink/flink-cdc-flink-2.2, nested under a new flink-cdc-flink aggregate, so the compatibility layer is named after the Flink version it targets and future lines can grow as sibling modules - the layout used by Paimon and Fluss. Pure rename: class content and build behavior are unchanged. References updated accordingly: root pom modules, the compat dependency declarations, neutralization profiles and test-classpath copy steps in cli, common, composer, runtime, dist, connect and source-connectors, the shade include wildcard in the SQL connector fat jar modules, the javadoc exclusion list in docs.sh (switched to relative paths, since bare artifactIds only match root-level modules), and AGENTS.md. Verified on JDK 11 with full clean installs of both Flink generations (default and -Pflink2; RAT skipped locally because of untracked draft files - all touched headers are repo-standard). Every fat jar was checked to still shade the complete compat class set: dist and SQL connector fat jars on both lines contain all 21 / 38 classes respectively.
…c-compat Per review feedback on apache#4632: the aggregate name flink-cdc-flink reads confusingly next to its children (flink-cdc-flink-1.20 / -2.2). Use the original flink-cdc-compat name for the aggregate directory and artifactId; the child module names are unchanged. Pure rename again: both generations build green, the fat jars are class-for-class identical to the build before this change, and the javadoc exclusion paths in docs.sh follow the new directory.
…root pom
The root pom becomes the single generation switch point: its flink2 profile
now sets flink.version and flink.compat.artifactId (plus the elasticsearch
connector version) that were previously switched by local flink1/flink2
profiles in cli, common, composer, runtime, connect, source-connectors,
dist, the elasticsearch connector and pipeline-e2e-tests.
What remains module-local is genuinely module-local:
* cli/common/composer/runtime keep a slim flink2 profile that only activates
the root pom's flink2 test classpath machinery (copy-flink2-guava and the
surefire additional classpath elements), and take an unconditional
${flink.compat.artifactId} dependency instead of per-profile compat deps.
* dist keeps only the 2.x shaded guava dependency in its flink2 profile (the
1.x flavor comes from the inherited root dependency).
* connect keeps its compat test-jar machinery and copy-flink2-extra-libs
unchanged; runtime keeps flink2-exclude-flink1; the guava handling is
untouched.
Effective values are unchanged: every switched property evaluates to the
same value on both profiles, and the flink2-line dist and mysql fat jars are
class-for-class identical to the previous build (12770 / 11406 classes, no
differences). Both generations build green (full clean install, default and
-Pflink2) and the -Pflink2 unit tests of the core modules pass (the only
failures are the documented Windows-only CliFrontendTest / AiFunctionParserTest
cases that fail on master as well).
sd4324530
force-pushed
the
FLINK-41642-consolidate-generation-switching
branch
from
November 24, 2026 13:29
ea1ae18 to
9cffc70
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Make the root pom the single Flink generation switch point. Today the 1.20-vs-2.2 switching is scattered across module-local
flink1/flink2profiles (cli, common, composer, runtime, connect, source-connectors, dist, pipeline-e2e-tests, plus the elasticsearch connector's local version switch) - and the root pom'sflink2profile did not even switchflink.version. After this PR a module carries no generation-scoped property of its own; enabling-Pflink2at the root switches everything.This is the second step of the multi-version compatibility refactor tracked in FLINK-41452 (sub-task: FLINK-41642), stacked on top of the module-rename PR, and is a pure property move: no effective value changes anywhere.
Brief change log
flink.compat.artifactIddefault (flink-cdc-flink-1.20), and itsflink2profile now setsflink.version,flink.compat.artifactIdand the elasticsearch connector version, alongside the kafka / paimon / iceberg / fluss versions it already switched.flink.connector.elasticsearch.versionoverride. The modules take an unconditional${flink.compat.artifactId}dependency instead of per-profile compat declarations, with the per-module scopes preserved exactly.flink2profile whose only job is to activate the root pom's flink2 test classpath machinery - thecopy-flink2-guavaexecution and the surefire additional classpath elements are defined in the root pom's pluginManagement, and they only run for modules that declare the plugins. Removing those declarations would silently drop guava from the flink2 test classpath.flink2profile; the 1.x flavor comes from the dependency inherited from the root pom.copy-flink2-extra-libsunchanged; runtime keepsflink2-exclude-flink1. The guava handling is untouched.Verifying this change
mvn clean install -DskipTestson JDK 11 for both generations (default and-Pflink2), with the repository gates (spotless / checkstyle) green.flink.version,flink.compat.artifactId, the kafka and elasticsearch connector versions) evaluates to exactly the same values on both profiles as before the change (mvn help:evaluateon both profiles).-Pflink2unit tests of the core modules pass, and the copied guava33 jars are present intarget/flink2-extra-libs, so the flink2 test classpath machinery is verified active.Documentation
Was generative AI tooling used to co-author this PR?
Generated-by: CodeBuddy (GLM-5.3)