Build: #3015 was successful
Job: Build was successful
Code commits
Openfire (master)
-
daryl herzmann 7cf9c19b51eb2d45075065647c2daf0c16d932f1
Merge pull request #3241 from guusdk/OF-3238_CockroachDB-support-introduction
OF-3238: Add exploratory CockroachDB support -
Guus der Kinderen 2b0dee006a4a26359e2350f63833537ff16d7ccc
OF-3238 (code review): CI shouldn't use TTY allocation
- .github/workflows/continuous-integration-workflow.yml (version 2b0dee006a4a26359e2350f63833537ff16d7ccc)
-
Guus der Kinderen c5ac56c595b93dac1e4b19af828203ca839a0ac5
fixup
- distribution/src/database/upgrade/38/openfire_cockroachdb.sql (version c5ac56c595b93dac1e4b19af828203ca839a0ac5)
-
Guus der Kinderen 155b94d0618ae924cd04837eae0cadb27ed421c6
OF-3238: Fix CockroachDB detection fallback to prevent PostgreSQL schema selection
When Openfire connects to CockroachDB through the PostgreSQL JDBC driver, database metadata can look PostgreSQL-like. In that case, Openfire could classify the database as `postgresql` and load `openfire_postgresql.sql` instead of `openfire_cockroachdb.sql`.
This change hardens detection in `DbConnectionManager` by:
- capturing JDBC URL metadata,
- preserving existing direct Cockroach string checks, and
- adding a fallback probe (`SELECT version()`) for PostgreSQL-compatible connections to detect CockroachDB reliably.
If the probe finds "cockroach" in the version string, database type is set to `cockroachdb`, ensuring Cockroach-specific install/upgrade scripts are selected.- xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java (version 155b94d0618ae924cd04837eae0cadb27ed421c6)
-
Guus der Kinderen 911ed94233b8b5a63ad1754c52891ee9e296411e
OF-3238 (code review): database setup to handle duplicate driver name
CockroachDB and Postgres use the same driver. This adds a challenge to auto-populate the database URL in the setup page. Up until now, this was based on the driver name.
In this commit, the default port is used as a differentiator. That allows the proper data to be populated based on the database selection.- xmppserver/src/main/webapp/setup/setup-datasource-standard.jsp (version 911ed94233b8b5a63ad1754c52891ee9e296411e)
-
Guus der Kinderen 2faa6798a24177ed3ada99bd372f46e10bad7cb8
OF-3238: Add exploratory CockroachDB support
This is an exploratory change to evaluate whether adding CockroachDB support to Openfire is feasible.
The change adds CockroachDB database handling across schema installation, a version-38 upgrade script, setup presets, and documentation. It also adds
install/upgrade CI coverage using CockroachDB in Docker.
CockroachDB support is implemented via PostgreSQL wire compatibility, using the existing PostgreSQL JDBC driver.- .github/workflows/continuous-integration-workflow.yml (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- build/ci/compose/cockroachdb.yml (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- build/ci/updater/src/main/java/com/igniterealtime/openfire/updaterunner/Main.java (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- distribution/src/database/openfire_cockroachdb.sql (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- distribution/src/database/upgrade/38/openfire_cockroachdb.sql (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- documentation/database.html (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)
- xmppserver/src/main/webapp/setup/setup-datasource-standard.jsp (version 2faa6798a24177ed3ada99bd372f46e10bad7cb8)