Skip to content

Upgrade Guava to 33.8.0-jre and bump minimum CDAP to 6.12.0-SNAPSHOT - #695

Open
sahusanket wants to merge 1 commit into
developfrom
feat/guava-33.7.2
Open

sahusanket wants to merge 1 commit into
developfrom
feat/guava-33.7.2

Conversation

@sahusanket

@sahusanket sahusanket commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrade com.google.guava:guava from 13.0.1 (and module/profile overrides 31.0.1-jre, 31.1-jre, 32.1.2-jre) to 33.8.0-jre across database-plugins to remediate CVE-2026-118042, CVE-2026-102554, CVE-2023-2976, and CVE-2020-8908 across both top-level plugin bundles and nested CloudSQL/Aurora/MariaDB plugin JARs.

Depends on: cdapio/cdap#16385 (CDAP 6.12.0-SNAPSHOT Guava 33.8.0-jre upgrade, required by HydratorTestBase / cdap-unit-test in CI).

Changes

  • Bump <guava.version> to 33.8.0-jre and <cdap.version> to 6.12.0-SNAPSHOT in root pom.xml, removing legacy <guava.version> / dependencyManagement overrides in cloudsql-postgresql-plugin/pom.xml and the e2e-tests profile, and declaring managed com.google.guava:guava in cloudsql-mysql-plugin/pom.xml.
  • Configure explicit <releases> / <snapshots> flags on sonatype-snapshots (pom.xml) and redshift (amazon-redshift-plugin/pom.xml) so Maven 3.8+ snapshot resolution does not probe HTTP-only release repositories.
  • Export io.cdap.plugin.db.* in aurora-mysql-plugin/pom.xml and generic-database-plugin/pom.xml because AuroraMysqlSource and DatabaseSource inherit AbstractDBSource#getDBRecordType() returning io.cdap.plugin.db.DBRecord.class, which Hadoop DBConfiguration#getInputClass() loads dynamically via OSGi Export-Package.
  • Guard GenericDatabasePluginTestBase#tearDownDB when hsqlDBServer is null so @AfterClass does not mask setup exceptions.

Verification

  • Built and tested all 20 reactor modules on Temurin JDK 11 (mvn validate checkstyle:check test-compile package and unit tests across database-commons, generic-database-plugin, mysql-plugin, postgresql-plugin, mssql-plugin, oracle-plugin, and cloudsql-*, plus -P e2e-tests test-compile): 0 RAT issues, 0 Checkstyle violations, and 260 Surefire tests passed (0 failures, 0 errors), including GenericDatabasePluginTestSuite (10/10 HSQLDB ETL pipeline runs).
  • Verified all 18 packaged plugin bundle JARs (both top-level lib/ and 2-hop nested lib/*-plugin-*.jar!/lib/ inside cloudsql-postgresql-plugin, cloudsql-mysql-plugin, aurora-postgresql-plugin, and mariadb-plugin) embed guava-33.8.0-jre.jar and failureaccess-1.0.3.jar with zero < 33.8.0 Guava JARs.
  • Verified live on CDF Autopush (guava32-j11-e2e, isolated namespace e2e_p05): uploaded USER artifacts and widget/doc JSON properties across postgresql-plugin, mysql-plugin, mssql-plugin, oracle-plugin, cloudsql-postgresql-plugin, cloudsql-mysql-plugin, and generic-database-plugin, verified /extensions, /properties?scope=USER, positive/negative /validations/stage field attribution, /connections/test, Preview, and DataPipelineWorkflow execution on Dataproc (0 linkage errors across pod and workflow logs).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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();
  }
}

@sahusanket sahusanket changed the title Upgrade Guava to 33.7.2-jre and bump minimum CDAP to 6.12.0-SNAPSHOT Upgrade Guava to 33.8.0-jre and bump minimum CDAP to 6.12.0-SNAPSHOT Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant