Skip to content

[3.0] [flink-cdc-dist] Collect all distro resources into a TAR#2636

Merged
PatrickRen merged 7 commits intoapache:masterfrom
GOODBOY008:master-3.0
Dec 1, 2023
Merged

[3.0] [flink-cdc-dist] Collect all distro resources into a TAR#2636
PatrickRen merged 7 commits intoapache:masterfrom
GOODBOY008:master-3.0

Conversation

@GOODBOY008
Copy link
Copy Markdown
Member

@GOODBOY008 GOODBOY008 commented Nov 6, 2023

Close #2621 #2622

@GOODBOY008 GOODBOY008 requested a review from PatrickRen November 6, 2023 05:55
@GOODBOY008 GOODBOY008 changed the title [3.0] [flink-cdc-dist] Collect all distro resources into a TAR WIP [3.0] [flink-cdc-dist] Collect all distro resources into a TAR Nov 6, 2023
@GOODBOY008 GOODBOY008 changed the title WIP [3.0] [flink-cdc-dist] Collect all distro resources into a TAR [3.0] [flink-cdc-dist] Collect all distro resources into a TAR Nov 7, 2023
Copy link
Copy Markdown
Contributor

@PatrickRen PatrickRen left a comment

Choose a reason for hiding this comment

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

@GOODBOY008 Thanks for the PR! I left some comments.

Comment thread flink-cdc-dist/pom.xml Outdated
Comment thread flink-cdc-dist/pom.xml Outdated
Comment thread flink-cdc-dist/src/main/assembly/conf/.gitkeep Outdated
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found some suspicious JARs in the final tarball:

  • Awaitility: This should be a test dependency, and should not be a part of the distribution. We need to change its scope to test in pom.
  • Hamcrest: This is defined as test scope in out project, but brought into the project as compile by Awaitility. I guess it will disappear once we change Awaitility to test scope.
  • flink-cdc-dist: This is a JAR without any class file inside. We can just skip it when assembling.
  • commons-cli: What about packaging it directly into flink-cdc-cli?

Things missing:

  • Log4j JAR and config file: Users cannot have logging locally without them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

About log4j I made a second thought, that maybe it's better to use log4j JARs under FLINK_HOME directly. We just need to provide a log4j configuration file for printing Flink CDC CLI and composer logs to a local file. Sorry for that!

Comment thread tools/ci/compile.sh Outdated
GOODBOY008 and others added 5 commits November 30, 2023 12:03
- flink-cdc-dist should depends on all Flink CDC modules to enforce the building order
- Package a uber JAR with all Flink CDC classes and dependencies
- Remove the profile to make packaging flink-cdc-dist as the default behavior
- Keep a directory under target for easier validation
- Add logic for copying flink-cdc-dist uber JAR to lib
@PatrickRen
Copy link
Copy Markdown
Contributor

I pushed 4 commits to the PR just now:

  1. Re-arrange pom sttructure
  • flink-cdc-dist should depends on all Flink CDC modules to enforce the building order
  • Package a uber JAR with all Flink CDC classes and dependencies
  • Remove the profile to make packaging flink-cdc-dist as the default behavior
  1. Move cdc-bin to flink-cdc-bin

  2. Improve assembly files

  • Keep a directory under target for easier validation
  • Add logic for copying flink-cdc-dist uber JAR to lib
  1. Provide a log4j configuration for CLI running

@GOODBOY008 Could you take a look at the PR? I checked the packaged tarball and it should work as expected now.

@GOODBOY008
Copy link
Copy Markdown
Member Author

@PatrickRen I tested on my local, works as we want. Thank you for complete my rest work and address issue. 👍

Copy link
Copy Markdown
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @GOODBOY008 and @PatrickRen for the great work, I went through the files, LGTM

@PatrickRen PatrickRen merged commit 1a5065e into apache:master Dec 1, 2023
@leonardBang leonardBang added this to the V3.0.0 milestone Dec 1, 2023
e-mhui pushed a commit to e-mhui/flink-cdc-connectors that referenced this pull request Dec 2, 2023
ChaomingZhangCN pushed a commit to ChaomingZhangCN/flink-cdc that referenced this pull request Jan 13, 2025
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.

[flink-cdc-dist] Build a uber JAR for all flink-cdc modules

3 participants