Problem/Motivation
#2318191: [meta] Database tests fail on SQLite fixed all Database tests when running SQLite as database backend. Now all remaining issues related to SQLite need to be fixed in order to make all tests pass the (temporary) SQLite TestBot.
Remaining tasks
Active:
Fixed:
#2475187: Add a user-space implementation for LIKE BINARY in SQLite
#2486831: The $dbh and $connection members are mixed up in Drupal\Core\Database\StatementPrefetch
#2484539: PostgreSQL: Fix views\Tests\Handler\FieldFieldTest
#2475247: SQLite: Fix views\Tests\Handler\FilterStringTest
#2454751: SQLite: Fix user\Tests\Views\RelationshipRepresentativeNodeTest
#2454747: SQLite: Fix sub-system tests in system test group
#2475177: SQLite: Fix system\Tests\Database\FetchTest
#2463321: Serializing the database connection is dangerous and error-prone, make it unserializable again
#2465633: Bring back the custom Statement class for the SQLite driver
#2454669: SQLite: Fix tests in migrate_drupal test group
#2463263: SQLite: Fix system\Tests\Entity\EntityDefinitionUpdateTest
#2454625: SQLite: Fix SQLITE_SCHEMA errors in web tests
#2454753: [Meta] SQLite: Fix sub-system tests in the views module
#2454721: SQLite: Fix comment\Tests\CommentFieldsTest
#2454723: SQLite: Fix config\Tests\ConfigImportAllTest
#2454727: SQLite: Fix contact\Tests\ContactStorageTest
#2454729: SQLite: Fix search\Tests\SearchNumbersTest
#2454731: SQLite: Fix search\Tests\SearchRankingTest
#2454733: Add a user-space case-insensitive collation to the SQLite driver
#2454735: SQLite: Fix toolbar\Tests\ToolbarAdminMenuTest
#2258177: Convert migrate_drupal tests to KernelTestBase
User interface changes
Nope.
API changes
Possible changes in the SQLite database driver.
| Comment | File | Size | Author |
|---|---|---|---|
| #33 | Screen Shot 2015-05-22 at 1.56.12 PM.png | 38.18 KB | webchick |
| #30 | sqlite-test-run.txt | 362.83 KB | amateescu |
Comments
Comment #1
dawehner+1 nice effort!
Comment #2
amateescu commentedThis is the list of tests that still fail with #2428695: SQLite date handling is wrongly implemented and arguments handling needs override applied:
I'll start opening sub-issues and post patches where I have them.
Comment #3
dawehner@amateescu
You should maybe also have a look https://www.drupal.org/files/issues/ktbng.1.patch ... it contains maybe a bunch of fixes for views and what not.
Comment #4
amateescu commented@dawehner, yup, I'll also start testing with that :)
Comment #5
amateescu commentedOpened #2454625: SQLite: Fix SQLITE_SCHEMA errors in web tests and #2454669: SQLite: Fix tests in migrate_drupal test group for the tests that can be fixed together. I'm afraid all the other ones will need individual care.
I looked at the patch mentioned in #3 but it seems all the SQLite fixes have been extracted into #2318191: [meta] Database tests fail on SQLite, so there's no further help to seek from it.
Comment #6
amateescu commentedAdded issues for all the other ones.
Comment #7
chx commentedI filed #2459745: Allow the database driver to skip test classes as a last resort.
Comment #8
amateescu commentedWow, that really is a last resort type of patch :) Thanks for heads up!
In the meantime, I made some more progress here, I figured out that we can move the fix from #2454625: SQLite: Fix SQLITE_SCHEMA errors in web tests up a level to fix even more tests, so I closed a few sub-issues as duplicates, see comments #2 and #3 in that issue.
Comment #9
chx commentedPlease realize you will need #7. I am reasonably sure https://www.drupal.org/node/2157455#comment-9713189 can't pass as we do not have collation support in SQLite.
Comment #10
amateescu commented@chx, we do have it now: #2454733: Add a user-space case-insensitive collation to the SQLite driver
Comment #11
amateescu commentedI just opened #2463321: Serializing the database connection is dangerous and error-prone, make it unserializable again as a major bug in the database system and I'm hoping that it'll fix more tests than just the one mentioned in comment #1 there, so I'm advertising it in this meta in hope of quicker reviews :)
Comment #12
amateescu commentedWe're *really* close to having all tests passing on SQLite :) There are only 4 issues left that need review:
#2463321: Serializing the database connection is dangerous and error-prone, make it unserializable again
#2465633: Bring back the custom Statement class for the SQLite driver
#2454669: SQLite: Fix tests in migrate_drupal test group
#2463263: SQLite: Fix system\Tests\Entity\EntityDefinitionUpdateTest
Comment #13
jibranCan we close this and move #2454751: SQLite: Fix user\Tests\Views\RelationshipRepresentativeNodeTest to critical? And awesome work @amateescu.
Comment #14
catchLet's keep it open until we actually see a 100% test run with HEAD, but yes great to see this close.
Comment #15
catchComment #16
catchComment #17
amateescu commentedI had to open a few more today :/
#2475187: Add a user-space implementation for LIKE BINARY in SQLite
#2475177: SQLite: Fix system\Tests\Database\FetchTest
#2475247: SQLite: Fix views\Tests\Handler\FilterStringTest
And there are also some tests that fail on the DrupalCI bot but pass locally:
At some point I think I'll need to set up a DrupalCI environment locally to check them out.
Comment #18
xjmAlso see: #567148: Use ONLY_FULL_GROUP_BY for MySQL -- a change that allegedly broke SQLite somehow more than 5 years ago.
Comment #19
dcrocks commentedAnother old one. Shouldn't #2027727: Fix Sqlite Schema definition and add unit tests be tracked here as well?
Comment #20
amateescu commented3 child issues have been fixed in the meantime.
Comment #21
dawehner.
Comment #22
amateescu commentedYay, the new production branch of DrupalCI just got (back) support for SQLite testing: #2484103: Add support for sqlite database testing
Since the current temporary testbot is based on the older PoC DrupalCI code/containers, tomorrow I'll run all the failing tests to see what's really left to do here.
Comment #23
amateescu commentedWe are so close to having tests fully passing on SQLite!
I just ran all the failing test from the temporary testbot on a local DrupalCI setup with these patches applied:
#2475187-8: Add a user-space implementation for LIKE BINARY in SQLite
#2258177-18: Convert migrate_drupal tests to KernelTestBase
#2486831-1: The $dbh and $connection members are mixed up in Drupal\Core\Database\StatementPrefetch
#2484539-2: PostgreSQL: Fix views\Tests\Handler\FieldFieldTest
and I got some great results:
Sadly, I can not reproduce the MigrateDrupal6Test fail locally, I need to investigate how to debug in a DrupalCI container. Any hints are welcomed :)
Comment #24
amateescu commentedPosted a new patch in #2258177-22: Convert migrate_drupal tests to KernelTestBase which fixes the last failure, so we're 4 patch reviews away from closing this issue :)
Comment #25
catchComment #26
dawehner#2486831: The $dbh and $connection members are mixed up in Drupal\Core\Database\StatementPrefetch is in
Comment #27
amateescu commented1 more down, 2 to go :)
Comment #28
wim leersGo go @amateescu \o/
Comment #29
fabianx commented#2258177: Convert migrate_drupal tests to KernelTestBase is in already, just one more to go.
Comment #30
amateescu commentedI just did a full test run locally with the latest DrupalCI code / containers and I can confirm that all tests are passing with the patch from #2475187-16: Add a user-space implementation for LIKE BINARY in SQLite applied. Attaching the glorious test run :)
Comment #31
amateescu commentedYay, the last issue has been committed! I've emailed @bzrudi71 to see if he can update the current temporary testbot to the latest DrupalCI code, which should confirm my successful test run from #30.
Comment #32
dawehnerhttps://www.youtube.com/watch?v=ch02NDiG7M8
Comment #33
webchickHOLY FRIJOLES!! According to http://d8sqlitebot.erwanderbar.de/ we are now at ZERO FAILS!!!
The one exception btw is coming from:
(Edit: Oops, I should point out that according to bzrudi71 in this issue summary update, random exceptions are still happening on his bots and he's working on a fix.)
So I think... I think... I think it's... fixed?!???
F*CK YEAH AMATEESCU!! :D
Comment #34
xjmAW HECK YES! :) @amateescu wins at the internet.
So I think, +1 for marking it fixed. And then for any SQLite regressions between now and release:
Comment #35
Crell commented*throws confetti* Epic win!
Comment #36
bzrudi71 commentedYep, let's consider this one as fixed as all exceptions are bot issues (confirmed by dozens of runs) :) Hopefully we will see some *confetti* even for the not so loved 'most advanced open source database' namely PostgreSQL soon ;) Great work @amateescu!
Comment #37
moshe weitzman commentedNice work! If anyone spots problems with drush+sqlite please let us know.
Comment #38
amateescu commentedWOOHOO, thanks everyone for helping with this!