-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-11626] Guava version 25.1-jre for Hadoop/Cassandra and Guava version 30.1 (latest) for the rest #13740
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
Changes from all commits
35f5b05
851f8ce
8fb92ed
9006814
0ec2187
0183d98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,6 +83,14 @@ class BeamModulePlugin implements Plugin<Project> { | |
| """ | ||
| static AtomicInteger startingExpansionPortNumber = new AtomicInteger(18091) | ||
|
|
||
| /** List of paths to the projects that require Guava 25. Hadoop and Cassandra have dependency to | ||
| * methods available in the old Guava version (BEAM-11626) */ | ||
| static List<String> guava25Projects = [ | ||
| ":sdks:java:io:cassandra", | ||
| ":sdks:java:io:hadoop-format", | ||
ibzib marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ":sdks:java:io:hadoop-file-system", | ||
| ] | ||
|
|
||
| /** A class defining the set of configurable properties accepted by applyJavaNature. */ | ||
| class JavaNatureConfiguration { | ||
| /** Controls whether the spotbugs plugin is enabled and configured. */ | ||
|
|
@@ -436,7 +444,7 @@ class BeamModulePlugin implements Plugin<Project> { | |
| def google_oauth_clients_version = "1.31.0" | ||
| // Try to keep grpc_version consistent with gRPC version in google_cloud_platform_libraries_bom | ||
| def grpc_version = "1.32.2" | ||
| def guava_version = "25.1-jre" | ||
| def guava_version = guava25Projects.contains(project.path) ? "25.1-jre" : "30.1-jre" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would not this be problematic, causing Beam to depend on 2 different versions? Which version, users of Beam will be depending if they need to use Beam with one of these 3 projects?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There's no impact to the Beam Cassandra and Hadoop artifacts. The Maven artifact However, if Beam Cassandra / Hadoop users use Beam with beam-sdks-java-io-kinesis, beam-sdks-java-io-google-cloud-platform, or beam-sdks-java-extensions-sql-zetasql (they declare Guava dependency), then the users need to pin Guava version to 25.1-jre. They can use If the Beam users don't depend on any of beam-sdks-java-io-kinesis, beam-sdks-java-io-google-cloud-platform, or beam-sdks-java-extensions-sql-zetasql, then this change does not have any effect to them.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack. I think this would be an undocumented hurdle for the impacted users. I am not sure what is the best course of action. Hopefully @kennknowles would have a recommendation.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think I should document that condition ("if Beam Cassandra / Hadoop users use Beam with beam-sdks-java-io-kinesis, ...") somewhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We always treat library.java as a global constant. In all existing cases where a project requires a library version that deviates from library.java, we don't use library.java and instead hard-code that dependency in the project's build.gradle. IMO making library.java conditional on the project being compiled defeats the purpose of declaring a common version in the first place.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's great information. Let me try that. I see hadoop-common does that with Memo for myself in hadoop-common: |
||
| def hadoop_version = "2.10.1" | ||
| def hamcrest_version = "2.1" | ||
| def influxdb_version = "2.19" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaltay I added this note for potential impact to Beam users. The potential risk described here is not special to this Guava version. Every dependency upgrade, in general, carries a risk of introducing dependency conflicts if a user relies on removed methods or classes. (Therefore this note might not be needed.)