Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-20098] Don't add flink-connector-files to flink-dist, make dependencies explicit #14122

Closed

Conversation

aljoscha
Copy link
Contributor

@aljoscha aljoscha commented Nov 18, 2020

[FLINK-20098] Don't add flink-connector-files to flink-dist, make dependencies explicit

We currently add both flink-connector-files and flink-connector-base to flink-dist.

This implies, that users should use the dependency like this:

<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-connector-files</artifactId>
  <version>${project.version}</version>
  <scope>provided</scope>
</dependency>

which differs from other connectors where users don't need to specify provided.

Also, flink-connector-files had flink-connector-base as a provided dependency, which means that examples that use this dependency would not run out-of-box in IntelliJ because transitive provided dependencies will not be considered.

This removes the dependencies from flink-dist which lets users use the File Connector like any other connector.

I believe the initial motivation for "providing" the File Connector in flink-dist was to allow us to use the File Connector under the hood in methods such as StreamExecutionEnvironment.readFile(...). We could decide to deprecate and remove those methods or re-add the File Connector as an explicit (non-provided) dependency again in the future.

Brief change log

  • remove dependencies from flink-dist
  • change provided dependencies to instead be in compile scope
  • add File Connector modules to Table API uber jars because they are using them and were relying on them being present in flink-dist. This increases the size of the Table uber jars by a couple of kilo bytes but it should be negligible.

Verifying this change

Covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): maybe
  • The public API, i.e., is any changed class annotated with @Public(Evolving)may: 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/Mesos, ZooKeeper: no
  • The S3 file system connector: no

Documentation

Not applicable

…endencies explicit

We currently add both flink-connector-files and flink-connector-base to
flink-dist.

This implies, that users should use the dependency like this:

<dependency>
	<groupId>org.apache.flink</groupId>
	<artifactId>flink-connector-files</artifactId>
	<version>${project.version}</version>
	<scope>provided</scope>
</dependency>

which differs from other connectors where users don't need to specify
<scope>provided</scope>.

Also, flink-connector-files had flink-connector-base as a provided
dependency, which means that examples that use this dependency would not
run out-of-box in IntelliJ because transitive provided dependencies will
not be considered.

This removes the dependencies from flink-dist which lets users use the
File Connector like any other connector.

I believe the initial motivation for "providing" the File Connector in
flink-dist was to allow us to use the File Connector under the hood in
methods such as StreamExecutionEnvironment.readFile(...). We could
decide to deprecate and remove those methods or re-add the File
Connector as an explicit (non-provided) dependency again in the future.
@aljoscha
Copy link
Contributor Author

Second time might work. 😅

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 48788be (Wed Nov 18 13:19:34 UTC 2020)

Warnings:

  • 7 pom.xml files were touched: Check for build and licensing issues.
  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Nov 18, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@dawidwys dawidwys left a comment

Choose a reason for hiding this comment

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

+1, modulo one comment

Comment on lines +34 to +41
<!-- &lt;!&ndash; The SQL Client test uses a Table FileSource, which is not included in the normal table-->
<!-- dependencies &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.apache.flink</groupId>-->
<!-- <artifactId>flink-connector-files</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->

Copy link
Contributor

@dawidwys dawidwys Nov 19, 2020

Choose a reason for hiding this comment

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

Remove this? If there is a reason to leave it I can't see add a comment why do we have that commented out code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I put this in because I thought I might have to uncomment it but I was 90% sure that it was not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's why it's in a separate commit. I should have mentioned that before ... 🙈

@aljoscha
Copy link
Contributor Author

Merged!

@aljoscha aljoscha closed this Nov 19, 2020
@aljoscha aljoscha deleted the flink-20098-file-connector-deps branch November 19, 2020 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants