Repository navigation
guava_fixes - #251
guava_fixes#251AbhishekKumar9984 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request upgrades Guava to version 32.0.0-jre, updates CDAP, Spark, and Hadoop dependencies, and adds numerous Guava exclusions across POM files to prevent dependency conflicts. It also switches to hashUnencodedChars in StringPartitioner and adds startup/shutdown helpers to EmbeddedKafkaServer. Feedback highlights a potential ArrayIndexOutOfBoundsException in StringPartitioner if Math.abs receives Integer.MIN_VALUE, and notes issues in pom.xml where disabling snapshots on sonatype-snapshots conflicts with the use of a CDAP snapshot version, alongside a redundant Apache snapshot repository configuration.
fixes3
0677a36 to
14e9764
Compare
deepika-lalwani123
left a comment
There was a problem hiding this comment.
This depends on cdapio/cdap#16279. The currently published 6.12.0-SNAPSHOT still has Guava 13, so this PR cannot be validated or merged until that PR merges and CDAP (and Twill) are published. Please call out the dependency in the PR description.
|
@deepika-lalwani123 Updated the PR description to call out the dependency on cdapio/cdap#16279, and addressed all inline review comments. |
…cer rule, add StringPartitionerTest, and remove startAndWait/stopAndWait shims
Depends on: cdapio/cdap#16279
Issue :
Resolved security vulnerabilities (CVE-2023-2976 / CVE-2020-8908) associated with older versions of
com.google.guava:guava(13.0.1) and fixed compatibility issues with removed Guava 13 APIs.Root Cause :
pom.xmldepended oncom.google.guava:guavaversion13.0.1, CDAP/Spark/Netty dependencies transitively pulled in older Guava versions, andStringPartitioner/ test classes relied on legacy Guava 13 methods (Hashing.md5().hashString(CharSequence)andAbstractIdleService.startAndWait()/stopAndWait()) removed in newer Guava releases.Fix :
com.google.guava:guavafrom13.0.1to32.0.0-jrevia<dependencyManagement>inpom.xml, and addedmaven-enforcer-plugin(requireUpperBoundDeps).Hashing.md5().hashString(key.toString()).asInt()withHashing.md5().hashUnencodedChars(key.toString()).asInt()inStringPartitioner.javaand addedStringPartitionerTest.EmbeddedKafkaServertest callers fromstartAndWait()/stopAndWait()tostartAsync().awaitRunning()/stopAsync().awaitTerminated().<cdap.version>to6.12.0-SNAPSHOTand<hadoop.version>to3.3.6.Testing evidence: https://docs.google.com/spreadsheets/d/1Cw6Z_k3wlks7sAC4-Kg6FTIMRL7-zxLlsJIXvVJLrb8/edit?gid=0#gid=0