Skip to content

ci: bring back Oracle database coverage in GitHub Actions [full-ci] - #41808

Open
oc-tmueller wants to merge 3 commits into
masterfrom
ci/oracle-db-in-github-actions
Open

ci: bring back Oracle database coverage in GitHub Actions [full-ci]#41808
oc-tmueller wants to merge 3 commits into
masterfrom
ci/oracle-db-in-github-actions

Conversation

@oc-tmueller

Copy link
Copy Markdown

Description

The drone → GitHub Actions migration dropped the Oracle DB pipeline, and #41555 then removed the installer-side Oracle support, so an instance can no longer be installed against Oracle at all — even though the whole Oracle runtime layer (ConnectionFactory, OracleConnection, OracleMigrator, AdapterOCI8, OCIExpressionBuilder, plus Oracle branches in AppConfig, AllConfig, Files\Cache\Cache and many tests) is still shipped and untested.

This restores just enough to get that layer under test again.

1. CLI installer (feat:)

A partial revert of 95e3cde: OC\Setup\OCI, its dbSetupClasses entry, dbconnectionstring handling in AbstractDatabase, and the --database-connection-string option of maintenance:install.

The web installer is deliberately left unchanged — no template or setup.js change, and hasOracle is not re-added. getSupportedDatabases(false) reads the supportedDatabases config, which still defaults to sqlite, mysql, pgsql, so Oracle is not offered in the UI. This exists for CI coverage of code we still ship; it is not a re-declaration of production support for Oracle.

2. CI job (ci:)

php-unit.yml gains a databases input (defaulting to today's five jobs, so nothing changes for the existing matrix) and an oracle service on gvenzl/oracle-free:23-slim-faststart (23ai), using the same "empty image string disables the service" idiom as the existing mysql/postgres services.

Notable details:

  • The app user lives in the FREEPDB1 pluggable database, so --database-host is not passed; a connect string carrying SERVICE_NAME is used instead, and ConnectionFactory then takes its connectstring path.
  • oci8 is only requested from setup-php for Oracle jobs (it is built from source, so it costs a few minutes).
  • DB_TYPE is now exported to the Run PHPUnit step for Oracle only, so test-phpunit.sh narrows the run to --group DB as drone did. The other databases keep running the full suite exactly as today.

As in drone ("Note: do not run Oracle by default in PRs"), Oracle does not run on every PR: it is gated on full-ci in the PR title, plus a new nightly workflow.

3. One Oracle-specific bug found this way (fix:)

Oracle cannot store empty strings, so the file cache converts ''null before writing a row (#31692). For the storage root, whose path is the empty string, that left md5(null): a PHP 8 deprecation, and a path_hash that was the hash of null rather than of ''. This commit is separable if you would rather see it on its own.

Verification

Locally, against a real gvenzl/oracle-free:23-slim-faststart with oci8 3.4.0 and PHP 8.3:

  • the exact maintenance:install line from the workflow succeeds — 48 tables, 35 sequences, 35 triggers, 65 migrations
  • phpunit --group DB is green: Tests: 5421, Assertions: 35231, Skipped: 29

The 29 skips are pre-existing platform skips, including the three Oracle ones that were already in the tree (MDB2SchemaManagerTest::testAutoIncrement, MigratorTest::testDuplicateKeyUpgrade, ApiTest::testShareStorageMountPointdoctrine/dbal#4687).

What only CI can prove is the runner-side oci8 build time and the oracle service's health under Actions — hence full-ci on this PR.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Technical debt

Checklist

  • Code changes
  • Changelog items
  • Documentation (not needed — no user-facing feature)
  • Tests

🤖 Generated with Claude Code

@oc-tmueller
oc-tmueller requested a review from a team as a code owner September 4, 2026 15:38
oc-tmueller and others added 3 commits September 4, 2026 17:38
The Oracle database layer - ConnectionFactory, OracleConnection,
OracleMigrator, AdapterOCI8 and the OCI expression builder - has always
remained in the code base, but the setup class that makes it reachable
had been removed, so an instance could no longer be installed against
Oracle at all. That also meant no CI job could exercise that layer.

Restore OC\Setup\OCI, its dbSetupClasses entry, the dbconnectionstring
handling in AbstractDatabase and the --database-connection-string option
of maintenance:install.

The web installer is unchanged: Oracle is not offered there, because the
default supportedDatabases config still lists only sqlite, mysql and
pgsql.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
The drone to GitHub Actions migration dropped the Oracle pipeline. Bring
it back as a php-unit.yml matrix entry driven by a new databases input,
served by gvenzl/oracle-free:23-slim-faststart.

Oracle lives in the FREEPDB1 pluggable database, so the installer is
called with a connect string carrying SERVICE_NAME instead of a host.
The oci8 extension is only requested for Oracle jobs, and DB_TYPE is
only exported for Oracle so test-phpunit.sh narrows the run to
--group DB - the other databases keep running the full suite unchanged.

As in drone, Oracle does not run on every pull request: it is gated on
full-ci in the pull request title and runs nightly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
Oracle cannot store empty strings, so the file cache converts them to
null before writing a row. For the storage root, whose path is the empty
string, that left md5() being called with null: on PHP 8 that raises a
deprecation notice, and the resulting path_hash was the hash of null
rather than the hash of the empty string used on every other database.

Found by running the PHPUnit DB suite against Oracle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
@oc-tmueller
oc-tmueller force-pushed the ci/oracle-db-in-github-actions branch from 6680154 to 566b274 Compare September 4, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants