Skip to content

[FLINK-41641][build] Rename the Flink compat modules to version-specific names - #4632

Open
sd4324530 wants to merge 2 commits into
apache:masterfrom
sd4324530:FLINK-41641-rename-compat-modules
Open

sd4324530 wants to merge 2 commits into
apache:masterfrom
sd4324530:FLINK-41641-rename-compat-modules

Conversation

@sd4324530

@sd4324530 sd4324530 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request?

Rename the two Flink compatibility modules after the Flink version they target, and nest them under a flink-cdc-compat aggregate:

  • flink-cdc-flink1-compat -> flink-cdc-compat/flink-cdc-flink-1.20
  • flink-cdc-flink2-compat -> flink-cdc-compat/flink-cdc-flink-2.2

With the compatibility layer named per version, a future Flink line can be added as a sibling module instead of a generation-wide switch - the layout Paimon (paimon-flink-1.20, ...) and Fluss (fluss-flink-1.20, ...) already use.

This is the first step of the multi-version compatibility refactor tracked in FLINK-41452. The original attempt (#4623) bundled the whole refactor into one PR and was found too large to review, so it is being reworked as a series of small sub-task PRs; this PR supersedes #4623 and contains only the rename (sub-task: FLINK-41641). The remaining steps (root-pom consolidation, compat-layer split, per-version dist and connector artifacts, docs) follow as separate PRs.

Brief change log

Pure rename - zero class-content change. 75 files changed vs master (57 pure renames, 17 files with a few lines each, 1 new aggregate pom), in two commits: the rename itself, plus a follow-up that names the aggregate flink-cdc-compat per review feedback.

  • The two modules move under a new flink-cdc-compat aggregate (packaging pom, two modules); their artifactIds and parent declarations follow.
  • References updated: root pom <modules>; the compat dependency declarations, neutralization profiles and test-classpath copy steps in cli / common / composer / runtime / dist / connect / source-connectors; the shade include wildcard in the 7 SQL connector fat jar poms (flink-cdc-flink*-compat -> flink-cdc-flink-*); the javadoc exclusion list in docs.sh (switched to relative paths - bare artifactIds only match root-level modules); AGENTS.md (repository guidance kept in sync).
  • No profile id, property, CI workflow, guava handling or download-page GAV is touched.

Verifying this change

  • Full mvn clean install -DskipTests on JDK 11 for both generations (default and -Pflink2), with the repository gates (spotless / checkstyle) green.
  • Artifact-level check that nothing fell out of the fat jars after the shade-wildcard change: the dist and SQL connector fat jars were verified to contain the complete compat class set on both lines (21 / 38 classes, none missing).
  • No reference to the old module names remains anywhere in the tree.
  • E2E is covered by CI as usual.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

AGENTS.md, the repository guidance file, is updated to the new module names.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: CodeBuddy (GLM-5.3)

…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.
Comment thread flink-cdc-flink/pom.xml Outdated
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-cdc-flink</artifactId>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think the naming of flink-cdc-flink is a little confusing. Shall we use the original flink-cdc-compat as the parent module name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, and fixed.

…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.
@sd4324530

Copy link
Copy Markdown
Contributor Author

@yuxiqian Hi, the CI error doesn't seem to be related to this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants