Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
sqlite db driver
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2020 at 08:41 UTC
Updated:
30 Oct 2020 at 22:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mcdruid commentedComment #3
mcdruid commentedComment #4
mcdruid commentedThere's a patch in #3173146: D7 CI failure with SQLite db using WAL which I think allows D7 tests to run properly in drupalci with WAL enabled for SQLite.
With that in place on a local drupalci set up the tests for #3172877-5: Enable WAL journal mode by default for SQLite database [D7 backport] ran with only these failures:
So with any luck, those are the only other problems that we'll need to look at fixing; they should each have their own issue.
Comment #5
izmeez commented@mcdruid You are doing an amazing job.
Comment #6
mcdruid commentedAdded child issues for the 3 failing tests.
Comment #7
mcdruid commented@izmeez awww, thank you - appreciate that!
Comment #8
mcdruid commentedComment #9
mcdruid commentedComment #10
mcdruid commentedComment #11
mcdruid commentedComment #12
mcdruid commentedIt's a bit unusual to do this, but here's a patch which combines all 5 patches from the list in the IS:
The reason for doing this is that the first 2 in the list are required to actually have drupalci test SQLite patches successfully.
Once those two are committed, we can test the others normally.
With any luck though, this combined patch should demonstrate all tests passing successfully.
Comment #13
mcdruid commentedOk, looks like there are at least two problems:
1) Looks like SQLite testing is a still a bit fragile:
https://www.drupal.org/pift-ci-job/1837005
AFAICS that may be due to concurrency. I can't really think what else would cause it to happen intermittently.
As the SQLite tests are very fast when they do work successfully, I wonder if we could dial down the concurrency and make them more reliable? I'll talk to @mixologic about it.
2) I've not seen this one before:
...along with 4 of these:
AFAICS that test should be skipped for anything other than MySQL (SQLite doesn't have a
CONNECTION_ID()function so this is never going to work):https://git.drupalcode.org/project/drupal/-/blob/7.73/modules/simpletest...
So I'm not really sure why this code is running in the first place.
#3128880: Make ConnectionUnitTest also run for PostgreSQL is sort of relevant but doesn't have anything we can backport for SQLite.
Comment #14
mcdruid commentedComment #15
mcdruid commentedFiled #3174121: Intermittent errors with D7 SQLite tests to suggest running drupalci with a lower concurrency for D7 / SQLite.
Adding 3174134-2.patch to the combined patch (also added the issue to the IS).
Again, no interdiff as that new patch would be it.
Comment #16
joseph.olstadnice work!
100% success.
Comment #17
MixologicIf there are intermittent errors with high concurrency, that reveals a bug with the sqlite db implementation, and isnt something that should be 'fixed' by dialing down the testbot concurrency.
Comment #18
joseph.olstad@Mixologic , might be due to the fact that the previous run was only a partial patch
the full combined patch in #15 seems ok.
Comment #19
mcdruid commentedThe first test run in #12 hit an exception ( https://www.drupal.org/pift-ci-job/1837005 ) which went away with a re-run, so with that small sample size, I'd call it an intermittent problem.
I won't argue that it reflects the fact that D7 might not handle a lot of db churn with high concurrency using SQLite, and I can see the point of view that we shouldn't try to avoid that by being gentler with the testbot :)
I don't think improving that's going to be a high priority any time soon, but patches always welcome!
In the meantime, it looks like we might have been unlucky and hopefully it'll work most of the time (and will eventually succeed with a rerun or two), so I think this is a definite improvement to D7's test coverage.
We'll work on getting the patches reviewed and committed.
Comment #20
mcdruid commentedTidied IS to make this easy to review.
Comment #21
mcdruid commentedComment #22
mcdruid commentedLooks like tests are passing with all versions of PHP / MySQL / SQLite we've tried (bar the odd testbot hiccup, typically solved by a re-run).
Comment #23
joseph.olstadI just quickly went through the patch line by line.
It looks good to me, some test changes revolving around table prefixes had to look closely but the changes look good afaik.
It's definately an improvement.
The db api is a work in progress so I'd say put this into 7.x dev branch and continue working on the mysql 8 issue which will get a lot more people testing and already has some of its own test coverage.
Thanks!
Comment #24
mcdruid commentedJust committed what's hopefully the last patch on the list to get this working.
Here's a noop patch to confirm that D7 core now passes tests with SQLite.
Comment #25
mcdruid commentedYup, looks like tests pass in SQLite and MySQL now.
Nice. Thanks for your help everyone.
Comment #26
joseph.olstadGreat work @mcdruid, Thanks!
Comment #27
joseph.olstadMy appologies if I get your name mixed up with McDavid a lightning fast hockey player. I just caught myself on it.
Comment #28
joseph.olstad@mcdruid , one important thing we need to do now, can you please add automated sqlite testing to this page:
https://www.drupal.org/node/3060/qa
this should run on commit!
Comment #29
mcdruid commentedYup, thanks @joseph.olstad I'd planned on adding SQLite tests on commit - I just added it.
I prefer all lowercase, but no big deal :)
Thanks for your help!
Comment #30
joseph.olstadThanks for that!
Lol, I was referring to this Mc: