Repository navigation
Upgrade Guava to 33.8.0-jre and bump minimum CDAP to 6.12.0-SNAPSHOT - #695
sahusanket wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates dependency versions, including upgrading Guava to 33.7.2-jre and CDAP to 6.12.0-SNAPSHOT, cleans up redundant Guava dependency declarations, configures Maven repositories, and exports the io.cdap.plugin.db.* package in Aurora MySQL and Generic Database plugins. It also adds a null check for hsqlDBServer during test teardown in GenericDatabasePluginTestBase. Regarding the feedback, it is recommended to wrap the test teardown logic in a try-finally block to guarantee that hsqlDBServer.stop() is always called, preventing potential resource leaks if an exception is thrown while dropping tables.
| @AfterClass | ||
| public static void tearDownDB() throws SQLException { | ||
| if (!tearDown) { | ||
| if (!tearDown || hsqlDBServer == null) { |
There was a problem hiding this comment.
If an exception is thrown during the database teardown (for example, inside the try-with-resources block when dropping tables or getting a connection), hsqlDBServer.stop() will not be executed. This can cause the HSQLDB server to leak and remain running, potentially locking resources or affecting subsequent test suites.
Consider wrapping the teardown logic in a try-finally block to guarantee that hsqlDBServer.stop() is always called:
@AfterClass
public static void tearDownDB() throws SQLException {
if (!tearDown || hsqlDBServer == null) {
return;
}
try {
try (Connection conn = hsqlDBServer.getConnection();
Statement stmt = conn.createStatement()) {
stmt.execute("DROP TABLE \"my_table\"");
stmt.execute("DROP TABLE \"your_table\"");
stmt.execute("DROP USER \"emptyPwdUser\"");
stmt.execute("DROP TABLE \"MY_DEST_TABLE\"");
}
} finally {
hsqlDBServer.stop();
}
}04bdb81 to
8553c4d
Compare
Summary
Upgrade
com.google.guava:guavafrom13.0.1(and module/profile overrides31.0.1-jre,31.1-jre,32.1.2-jre) to33.8.0-jreacrossdatabase-pluginsto remediateCVE-2026-118042,CVE-2026-102554,CVE-2023-2976, andCVE-2020-8908across both top-level plugin bundles and nested CloudSQL/Aurora/MariaDB plugin JARs.Depends on: cdapio/cdap#16385 (CDAP
6.12.0-SNAPSHOTGuava33.8.0-jreupgrade, required byHydratorTestBase/cdap-unit-testin CI).Changes
<guava.version>to33.8.0-jreand<cdap.version>to6.12.0-SNAPSHOTin rootpom.xml, removing legacy<guava.version>/dependencyManagementoverrides incloudsql-postgresql-plugin/pom.xmland thee2e-testsprofile, and declaring managedcom.google.guava:guavaincloudsql-mysql-plugin/pom.xml.<releases>/<snapshots>flags onsonatype-snapshots(pom.xml) andredshift(amazon-redshift-plugin/pom.xml) so Maven 3.8+ snapshot resolution does not probe HTTP-only release repositories.io.cdap.plugin.db.*inaurora-mysql-plugin/pom.xmlandgeneric-database-plugin/pom.xmlbecauseAuroraMysqlSourceandDatabaseSourceinheritAbstractDBSource#getDBRecordType()returningio.cdap.plugin.db.DBRecord.class, which HadoopDBConfiguration#getInputClass()loads dynamically via OSGiExport-Package.GenericDatabasePluginTestBase#tearDownDBwhenhsqlDBServeris null so@AfterClassdoes not mask setup exceptions.Verification
mvn validate checkstyle:check test-compile packageand unit tests acrossdatabase-commons,generic-database-plugin,mysql-plugin,postgresql-plugin,mssql-plugin,oracle-plugin, andcloudsql-*, plus-P e2e-tests test-compile): 0 RAT issues, 0 Checkstyle violations, and 260 Surefire tests passed (0 failures, 0 errors), includingGenericDatabasePluginTestSuite(10/10 HSQLDB ETL pipeline runs).lib/and 2-hop nestedlib/*-plugin-*.jar!/lib/insidecloudsql-postgresql-plugin,cloudsql-mysql-plugin,aurora-postgresql-plugin, andmariadb-plugin) embedguava-33.8.0-jre.jarandfailureaccess-1.0.3.jarwith zero< 33.8.0Guava JARs.guava32-j11-e2e, isolated namespacee2e_p05): uploadedUSERartifacts and widget/doc JSON properties acrosspostgresql-plugin,mysql-plugin,mssql-plugin,oracle-plugin,cloudsql-postgresql-plugin,cloudsql-mysql-plugin, andgeneric-database-plugin, verified/extensions,/properties?scope=USER, positive/negative/validations/stagefield attribution,/connections/test, Preview, andDataPipelineWorkflowexecution on Dataproc (0linkage errors across pod and workflow logs).