Problem/Motivation
Quick attempts to have SQLite to run failed in the "PHPUnit Unit" job for the tests:
- PhpUnitCliTest.php
- TestSiteApplicationTest.php
Similar configurations for MySQL and PosgreSQL do work, so it might be related to the configuration of the webserver, or permissions or access to the DB.
Steps to reproduce
See the MR pipelines that will follow this issue creation that will trigger SQLite tests automatically.
Proposed resolution
Fix SQLite.
Remaining tasks
Continue working on the MR.
User interface changes
API changes
Data model changes
Issue fork drupal-3385620
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 11.x
compare
- 3385620-gitlabci-sqlite
changes, plain diff MR !4820
1 hidden branch
Issue fork gitlab_ci_testbed_for_drupal_core-3385620
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3385620-sqlite-integration
changes, plain diff MR !8
Comments
Comment #4
fjgarlin commentedMoving this to core. Recommended to create a new fork and branch from there instead.
A good starting point for the new MR is to uncomment the SQLite options in the matrix and start testing/debugging within the MR.
Comment #5
catchComment #7
andypostComment #9
andypostDSN needs fix https://www.php.net/manual/en/ref.pdo-sqlite.connection.php
Comment #10
andypostSomehow run-tests require
--dburlin custom format https://git.drupalcode.org/issue/drupal-3385620/-/jobs/97891ERROR: Invalid --dburl. Reason: Minimum requirement: driver://host/databaseComment #11
andypostI pushed fake
sqlite-3image which is sleeping all the time, so it used to conform other databaseshttps://git.drupalcode.org/project/drupalci_environments/-/commit/e72735...
Comment #12
andypostNightwatch tests needs variable https://git.drupalcode.org/issue/drupal-3385620/-/jobs/98006
And one kernel test fails https://git.drupalcode.org/issue/drupal-3385620/-/jobs/98034
Comment #13
wim leersWow I didn't even realize this was not yet working — because in my experience, SQLite-on-RAMdisk is way faster than MySQL. So that means this has the potential to further speed up the time to get complete test results. Maybe not for core (where MariaDB/MySQL is used by >90% of sites), but for contrib it could help!
Comment #14
fjgarlin commentedFor D7 core, where it just worked without issues on a very similar setup, SQLite is blazing fast.
I'm close to finish some other priorities (like D7 core and D7 contrib GitlabCI integration) and then I should be able to jump on this, but happy for you all to try to fix and debug.
Comment #15
catchIf it's significantly faster than mysql we could consider setting sqlite as the default MR environment, and then ensure we run MySQL tests too prior to commit.
Comment #16
fjgarlin commentedI think this is ready for review now.
MR: https://git.drupalcode.org/project/drupal/-/merge_requests/4820/diffs
Note that we skipped two tests for SQLite based on Slack conversation https://drupal.slack.com/archives/CGKLP028K/p1695980781697999 with @catch. Both tests test for a non-existent database but SQLite creates them on the fly if they don't exist.
Pipeline with SQLite runs: https://git.drupalcode.org/issue/drupal-3385620/-/pipelines/25125
Comment #17
catchLooks great to me, we're only skipping the tests here no actual refactoring, so I think it's OK in the one issue. We should enable this and then we'll get a better idea about overall stability - and be able to switch more of DrupalCI off too.
Comment #19
longwaveAgree that skipping those two tests on SQLite is fine given they are only for edge cases in migrate.
Committed and pushed d0cfc6d004 to 11.x and 7f06eb5ed8 to 10.1.x. Thanks!
Comment #21
catchMoved sqlite down to daily tests for 11.x and 10.1.x on DrupalCI.