feat(1500): PostgreSQL external CMS repository foundation - #1505
Conversation
Add first-class PostgreSQL support for external CMS repository targeting: JDBC constants and isPostgres, TableFactory POSTGRES type map, installer db.type/DB_BACKEND=POSTGRES resolution, sample dbprops, driver packaging (postgresql-42.7.7), and Hibernate PostgreSQLDialect registration. Does not change the default embedded H2 engine (#548). Live install smoke against a Postgres server is deferred to follow-on work. > Co-Authored by Grok Build using grok-4.5 with agent main.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous Review Summaries (7 snapshots, latest commit f900838)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f900838)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit 1604e17)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit 309ac65)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit f4b56a4)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit d576bb7)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit bf2b488)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Previous review (commit d5de975)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (22 files)
Fix these issues in Kilo Cloud Additional previous summary content was truncated to keep this comment within platform limits. Reviewed by step-3.7-flash · Input: 36.9K · Output: 8.5K · Cached: 212.7K |
- Add PostgreSQL JDBC driver (42.7.7) to delivery-tier-distribution/pom.xml - Add PostgreSQL branch to MainDTSPreInstall.java (URL, driver, dialect, schema) - Add JDBC_POSTGRESQL_DRIVER constant to PSMetadataQueryService.java - Add PostgreSQL entries to perc-datasources.properties.sample - Add PostgreSQL comments to polls and forms service property files > Co-Authored by Kilo using MiniMax-M2
- Add MySQL 8.0 with UTF-8 (utf8mb4) character set and collation - Add PostgreSQL 16 - Add SQL Server 2022 - Add docker profiles: --profile mysql, --profile postgres, --profile sqlserver, --profile db-all - Add perc-datasources.postgresql.properties.sample for DTS config Usage: docker compose --profile mysql up -d # MySQL only docker compose --profile postgres up -d # PostgreSQL only docker compose --profile sqlserver up -d # SQL Server only docker compose --profile db-all up -d # All databases > Co-Authored by Kilo using MiniMax-M2
- Add SILENT_KEY constant to DbInstallConfigResolver - Add isSilentMode() helper to check for --silent or --no-tty - Update Main.java to disable interactive prompts in silent mode - Update MainDTSPreInstall.java to disable interactive prompts in silent mode - Add help text for silent mode options Usage: java -jar perc-preinstall.jar /opt/Percussion --silent java -jar perc-preinstall.jar /opt/Percussion --no-tty > Co-Authored by Kilo using MiniMax-M2
- Add install.spec.js Playwright test for fresh CMS install - Supports testing: h2, mysql, postgresql, sqlserver - Environment variables: TEST_DB_TYPE, TEST_INSTALL_DIR, TEST_CMS_PORT - Can skip install and test running CMS via TEST_SKIP_INSTALL Usage: TEST_DB_TYPE=postgresql npm test -- tests/install.spec.js > Co-Authored by Kilo using MiniMax-M2
- Add cms-h2, cms-mysql, cms-postgresql, cms-sqlserver services - Each service installs CMS fresh and starts Jetty in container - Use profiles: --profile cms-h2, --profile cms-mysql, etc. - Separate from existing cms-dts dev setup (bind-mounted local install) - Update install.spec.js to test running containers Usage: docker compose --profile cms-h2 up -d # H2 fresh install docker compose --profile cms-mysql up -d # MySQL fresh install docker compose --profile cms-postgresql up -d # PostgreSQL fresh install docker compose --profile cms-sqlserver up -d # SQL Server fresh install docker compose --profile cms-all up -d # All fresh installs > Co-Authored by Kilo using MiniMax-M2
> Co-Authored by Kilo using MiniMax-M2
Review on #1505 flagged applyDtsHintsFromCms URL construction. The existing "jdbc:postgresql:" + DB_SERVER("//host:port/db") form already yields the correct jdbc:postgresql://host:port/db URL (same pattern as mysql/sqlserver). Add a clarifying comment and assert perc.db.dts.jdbcUrl in dbpropsPostgresBackendAccepted so regressions fail loudly. Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
Resolve conflicts retaining PostgreSQL foundation (#1500): - DbInstallConfigResolver: keep POSTGRES/postgresql normalize paths - BundledJdbcDrivers + install.xml: keep postgresql-42.7.7.jar - pom.xml: keep postgresql.version (h2 stays on development placement) - system/config.xml: keep postgresql PSXJdbcDriverConfig Verified: DbInstallConfigResolverTest, InstallXmlDeleteSetTest, StagingCleanupAntScriptTest, ExternalDbSamplePropsPackagingTest (30/30). Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
Replace broken long-lived compose cms-* services (fictional perc-preinstall.jar paths) with a Layer-1 harness that: - mounts real perc-distribution-tree / delivery-tier-distribution jars - silent + no-tty install with structured --db.* args - starts Jetty (CMS) or Tomcat (DTS) - probes login/health, records JSON under docker/logs/ - destroys the cell (or --keep for Playwright Layer 2) Supports product cms,dts and db h2,postgresql,mysql,sqlserver. Unit tests cover argv building and jar resolution (11/11). Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
Resolve exactly perc-distribution-tree.jar and delivery-tier-distribution.jar (customer assembly artifacts). Never select *-SNAPSHOT.jar from the plain jar plugin — those lack the runnable Main-Class and are not what we ship. Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
build_install_argv used str(Path) which becomes backslashes on Windows, failing python-build-scripts on windows-latest. The cell runs in Linux containers; use Path.as_posix() so java -jar argv stays portable. Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
Silent install failed with MissingResourceException key h2 when RxLogTables/InstallUtil looked up JDBC driver class names via ResourceBundle. Add h2/postgresql/postgres keys alongside existing mysql/derby/sqlserver driver mappings; unit test locks the keys. Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
PSExecSQLStmt only selected Derby/MySQL/Oracle/MSSQL/DB2 dialects, so H2 installs fell through to MSSQL str() and failed view creation. Add sqlH2 and sqlPostgresql Ant attributes, H2→Derby fallback when sqlH2 is empty, and dialect SQL for community views that use str(). Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
H2 reserves VALUE; CREATE TABLE ... VALUE VARCHAR failed during silent install. Append NON_KEYWORDS=VALUE in PSJdbcUtils.getJdbcUrl for h2 and bake it into default install repository properties. Co-Authored by Grok Build Grok 4.5 using grok-4.5 with agent main.
Summary
Foundation for #1500 — first-class PostgreSQL as an external CMS repository backend (does not replace default embedded H2 from #548).
Locked labels
DB_BACKENDPOSTGRESdb.typepostgresql(aliaspostgres)postgresql/org.postgresql.Driverorg.postgresql:postgresql:42.7.7org.hibernate.dialect.PostgreSQLDialect5432/publicDB_SERVERform//host:port/databaseChanges
PSJdbcUtilsconstants, URL map, backend mapping, external-driver set;PSSqlHelper.isPostgres; unit testsDataTypeMap for="POSTGRES"(BOOLEAN/TEXT/BYTEA); map unit testDbInstallConfigResolveraccepts POSTGRES/postgresql; structured + dbprops paths; samplerxrepository.postgresql.propertiespostgresql-*.jar; exact upgrade delete includes forpostgresql-42.7.7.jar(+ missingh2-2.3.232.jardelete align with Apache Derby Migration #548)config.xmldriver config; Hibernate dialect entries in server-beans copiesdocs/ai-generated/tasks/1500-postgresql/README.mdOut of this PR
sys_DatabaseFunctionDefspostgres rowsTest plan
Standalone clean installs (repo-root
mvn-envfrom module dirs):PSJdbcUtilsTest8/8PSJdbcPostgresDataTypeMapTest1/1postgresql-42.7.7.jarCloses nothing yet — #1500 stays open until install smoke + residual product SQL parity.