Problem/Motivation
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] Connection refused
Quick attempts to have MariaDB 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 or the MariaDB image.
Steps to reproduce
See the MR pipelines that will follow this issue creation that will trigger MariaDB tests automatically.
Proposed resolution
Fix MariaDB integration.
Remaining tasks
Continue working on the MR.
User interface changes
API changes
Data model changes
Issue fork drupal-3385621
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:
- 3385621-gitlabci-mariadb-currently
changes, plain diff MR !5275
1 hidden branch
Issue fork gitlab_ci_testbed_for_drupal_core-3385621
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:
- 3385621-mariadb-integration
changes, plain diff MR !9
Comments
Comment #3
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 MariaDB options in the matrix and start testing/debugging within the MR.
Comment #4
catchComment #7
fjgarlin commentedI created a brand new fork and new MR as the other one was way outdated and coming from even another test project we initially used.
- New MR: https://git.drupalcode.org/project/drupal/-/merge_requests/5275
- Pipeline running: https://git.drupalcode.org/issue/drupal-3385621/-/pipelines/45352 (mariadb job is the first one in the "Test" column)
- MariaDB pipeline: https://git.drupalcode.org/issue/drupal-3385621/-/pipelines/45356
We can go from here using the above MR.
Comment #8
fjgarlin commentedComment #9
dimitriskr commentedThe cause for this is written here
#3399858: MariaDB 10.3.22 setup.sql creates a user that already exists
Comment #10
catchThis is one of the main blockers to switching off DrupalCI, so bumping to critical.
Comment #11
fjgarlin commentedThe related issue is now in "Needs review". Once there is an image available we can test here.
Comment #13
andypostPushed dev image and added extra WIP:commit to the MR to test new image, will remove after pipeline passed
Testing pipeline https://git.drupalcode.org/issue/drupal-3385621/-/pipelines/54549
Comment #14
andypostReverted debugging commit and pushed production image
I'm sure it needs follow-up to use supported MariaDB version as 10.3 is outdated
EDIT https://git.drupalcode.org/issue/drupal-3385621/-/pipelines/54560
Comment #15
andypostComment #16
dimitriskr commented@andypost I just pushed the 10.6 and 10.11 versions to the related issue's MR, I forgot to do it before
Comment #17
andypostI prefer to have consensus on which LTS versions we'll need in CI and figure out how it will be updated for CVEs and bugfix releases
Comment #18
fjgarlin commentedThanks for pushing the updated image. I can confirm that the MariaDB works now, as seen in the pipeline, which is great!!
I agree that any newer or LTS versions could go in a follow up as this issue was to make MariaDB work, and it works now 😀
I'm not marking RTBC as I created this MR but it's working as expected now. MariaDB pipeline: https://git.drupalcode.org/issue/drupal-3385621/-/pipelines/54691
Comment #19
catchLet's open a follow-up for MariaDB versions, we'll at least need the newest LTS release so we've got some room to raise 11.x requirements in #3215207: [11.x] [policy] Require MySQL 8.0 and MariaDB 10.6 but it doesn't need to block a commit here.
Comment #20
longwaveproves we are connecting to a mysql/mariadb instance, and _TARGET_DB is set correctly in the parent pipeline otherwise the database service wouldn't start at all, so this is RTBC.
Comment #23
catchCommitted/pushed to 11.x and 10.2.x, thanks!
#3401846: Add supported mariadb container images is already open.
I opened #3404019: [PP-1] Test against newer versions of MariaDB so we've got a core issue to add the environments once the containers are available.
Comment #25
andypostPlease close the MR