From 9799567e84dc57f816b979183d2510f470576922 Mon Sep 17 00:00:00 2001 From: ailegion Date: Tue, 22 Sep 2026 15:31:53 +0200 Subject: [PATCH 1/2] feat: build *-with-drivers bundles in CI and bump Kinetica driver to 7.2.3.26 The -with-drivers release zips were assembled by hand. This adds Gradle tasks that produce them and wires them into the main and release workflows. - drivers.yaml: bump Kinetica entry to v7.2.3.26 (same GitHub archive form) - binary/build.gradle: add downloadDrivers, per-platform runtimeZipWithDrivers_ and aggregate runtimeZipWithDrivers tasks. Bundle set: BigQuery (with libs/), Snowflake, Postgres, Redshift, DuckDB, Databricks, Kinetica (jar-with-dependencies only) - scripts/github_release.sh: upload the four with-drivers zips - workflows main.yml, release.yml: build binary:runtimeZipWithDrivers --- .github/workflows/main.yml | 2 +- .github/workflows/release.yml | 2 +- binary/build.gradle | 91 +++++++++++++++++++++++++++++ cli/src/main/resources/drivers.yaml | 4 +- scripts/github_release.sh | 4 ++ 5 files changed, 99 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f75b411c..927eb57e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: run: gradle test - name: Build binaries - run: gradle binary:runtimeZip + run: gradle binary:runtimeZip binary:runtimeZipWithDrivers - name: Build docker image run: 'scripts/docker.sh' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 952eb37a..9f2ec8ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: run: gradle test - name: Build binaries - run: gradle binary:runtimeZip + run: gradle binary:runtimeZip binary:runtimeZipWithDrivers - name: Update Version run: 'BRANCH_NAME=${{ github.ref_name }} scripts/update_version.sh' diff --git a/binary/build.gradle b/binary/build.gradle index 61527be5..b0c4d53f 100644 --- a/binary/build.gradle +++ b/binary/build.gradle @@ -90,3 +90,94 @@ runtime { windowsScriptTemplate = file("file:/${resourcesDir}/windows_template.txt") } } + +// --------------------------------------------------------------------------- +// *-with-drivers bundles: the runtime image plus a pre-filled drivers/ folder. +// --------------------------------------------------------------------------- + +def driverDownloadsDir = layout.buildDirectory.dir('driver-downloads') +def driversDir = layout.buildDirectory.dir('drivers') + +// JDBC drivers packaged into the bundles. Plain .jar links are copied as is. +// .zip links are extracted keeping only .jar files ('include' narrows that further, +// 'flatten' drops the archive's folder structure). +def bundledDrivers = [ + [name: 'Google Cloud BigQuery 4.2', url: 'https://storage.googleapis.com/simba-bq-release/jdbc/SimbaJDBCDriverforGoogleBigQuery42_1.3.0.1001.zip'], + [name: 'Snowflake 3.13.19', url: 'https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.13.19/snowflake-jdbc-3.13.19.jar'], + [name: 'Postgresql 42.3.7', url: 'https://jdbc.postgresql.org/download/postgresql-42.3.7.jar'], + [name: 'Redshift 42-2.1.0.30', url: 'https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.30/redshift-jdbc42-2.1.0.30.jar'], + [name: 'DuckDB 1.3.0.0', url: 'https://repo1.maven.org/maven2/org/duckdb/duckdb_jdbc/1.3.0.0/duckdb_jdbc-1.3.0.0.jar'], + [name: 'Databricks 2.6.40', url: 'https://repo1.maven.org/maven2/com/databricks/databricks-jdbc/2.6.40/databricks-jdbc-2.6.40.jar'], + [name: 'Kinetica 7.2.3.26', url: 'https://github.com/kineticadb/kinetica-client-jdbc/archive/refs/tags/v7.2.3.26.zip', + include: '**/kinetica-jdbc-7.2.3.26-jar-with-dependencies.jar', flatten: true], +] + +tasks.register('downloadDrivers') { + description = 'Downloads the JDBC drivers packaged into the *-with-drivers bundles' + outputs.dir driversDir + doLast { + def downloadDir = driverDownloadsDir.get().asFile + def targetDir = driversDir.get().asFile + downloadDir.mkdirs() + targetDir.deleteDir() + targetDir.mkdirs() + + bundledDrivers.each { driver -> + def fileName = driver.url.substring(driver.url.lastIndexOf('/') + 1) + def downloaded = new File(downloadDir, fileName) + if (!downloaded.exists()) { + logger.lifecycle("Downloading ${driver.name} from ${driver.url}") + new URL(driver.url).withInputStream { input -> + downloaded.withOutputStream { output -> output << input } + } + } else { + logger.lifecycle("Using cached ${driver.name}: ${downloaded}") + } + + if (fileName.endsWith('.zip')) { + copy { + from zipTree(downloaded) + include driver.include ?: '**/*.jar' + includeEmptyDirs = false + into targetDir + if (driver.flatten) { + eachFile { it.path = it.name } + } + } + } else { + copy { + from downloaded + into targetDir + } + } + } + } +} + +def bundlePlatforms = ['linux-x64', 'mac_x64', 'mac_aarch64', 'win_x64'] + +bundlePlatforms.each { platform -> + tasks.register("runtimeZipWithDrivers_${platform}", Zip) { + description = "Builds the ${platform} runtime image bundled with JDBC drivers" + dependsOn 'runtime', 'downloadDrivers' + + def bundleName = "rosetta-${project.version}-${platform}" + archiveFileName = "${bundleName}-with-drivers.zip" + destinationDirectory = layout.buildDirectory + + from(layout.buildDirectory.dir("image/binary-${platform}")) { + into bundleName + } + from(driversDir) { + into "${bundleName}/drivers" + } + filesMatching('**/bin/*') { + mode = 0755 + } + } +} + +tasks.register('runtimeZipWithDrivers') { + description = 'Builds the *-with-drivers bundles for all platforms' + dependsOn bundlePlatforms.collect { "runtimeZipWithDrivers_${it}" } +} diff --git a/cli/src/main/resources/drivers.yaml b/cli/src/main/resources/drivers.yaml index 3888eadc..fb224d13 100644 --- a/cli/src/main/resources/drivers.yaml +++ b/cli/src/main/resources/drivers.yaml @@ -6,8 +6,8 @@ link: https://jdbc.postgresql.org/download/postgresql-42.3.7.jar - name: MySQL 8.0.30 link: https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.30.zip -- name: Kinetica 7.1.7.7 - link: https://github.com/kineticadb/kinetica-client-jdbc/archive/refs/tags/v7.1.7.7.zip +- name: Kinetica 7.2.3.26 + link: https://github.com/kineticadb/kinetica-client-jdbc/archive/refs/tags/v7.2.3.26.zip - name: Google Cloud Spanner 2.6.2 link: https://search.maven.org/remotecontent?filepath=com/google/cloud/google-cloud-spanner-jdbc/2.6.2/google-cloud-spanner-jdbc-2.6.2-single-jar-with-dependencies.jar - name: SQL Server 12.2.0 diff --git a/scripts/github_release.sh b/scripts/github_release.sh index 6b3f1049..3d482f2e 100755 --- a/scripts/github_release.sh +++ b/scripts/github_release.sh @@ -83,4 +83,8 @@ upload_custom_release_file "rosetta-$APP_VERSION-linux-x64.zip" "binary/build/" upload_custom_release_file "rosetta-$APP_VERSION-mac_aarch64.zip" "binary/build/" upload_custom_release_file "rosetta-$APP_VERSION-mac_x64.zip" "binary/build/" upload_custom_release_file "rosetta-$APP_VERSION-win_x64.zip" "binary/build/" +upload_custom_release_file "rosetta-$APP_VERSION-linux-x64-with-drivers.zip" "binary/build/" +upload_custom_release_file "rosetta-$APP_VERSION-mac_aarch64-with-drivers.zip" "binary/build/" +upload_custom_release_file "rosetta-$APP_VERSION-mac_x64-with-drivers.zip" "binary/build/" +upload_custom_release_file "rosetta-$APP_VERSION-win_x64-with-drivers.zip" "binary/build/" upload_custom_release_file "cli-$APP_VERSION.jar" "cli/build/libs/" From f2e90f138d221e03fc76eb913a5eff1341add0f0 Mon Sep 17 00:00:00 2001 From: ailegion Date: Tue, 22 Sep 2026 15:53:08 +0200 Subject: [PATCH 2/2] est: update Postgres table count for rebuilt sakiladb/postgres image sakiladb/postgres:latest was rebuilt on 2026-07-01. The new schema drops the six payment_p2007_* inheritance partitions and adds film_text, leaving 16 base tables instead of 21. With the 5 tables the test creates, the extract now yields 21 tables, not 26. --- cli/src/test/java/integration/PostgresDDLIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/test/java/integration/PostgresDDLIntegrationTest.java b/cli/src/test/java/integration/PostgresDDLIntegrationTest.java index d76a0498..cf1b2c21 100644 --- a/cli/src/test/java/integration/PostgresDDLIntegrationTest.java +++ b/cli/src/test/java/integration/PostgresDDLIntegrationTest.java @@ -219,7 +219,7 @@ void prep() throws Exception { @Order(1) void textExtract() throws Exception { Database sourceModel = container.getDatabaseModel(); - assertSame("Comparing table count.", 26, sourceModel.getTables().size()); + assertSame("Comparing table count.", 21, sourceModel.getTables().size()); assertSame("Comparing actor table column count.", 4, container.getTableColumns(sourceModel, "actor").size()); }