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

Command icon 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:

Command icon 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:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Title: Add MariaDB as an option for testing » [GitlabCI] MariaDB currently not working
Project: GitlabCI Testbed for Drupal core » Drupal core
Version: » 11.x-dev
Component: Code » phpunit

Moving 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.

catch’s picture

fjgarlin’s picture

I 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.

fjgarlin’s picture

Issue summary: View changes
dimitriskr’s picture

catch’s picture

Priority: Normal » Critical

This is one of the main blockers to switching off DrupalCI, so bumping to critical.

fjgarlin’s picture

The related issue is now in "Needs review". Once there is an image available we can test here.

andypost made their first commit to this issue’s fork.

andypost’s picture

Status: Active » Needs review

Pushed 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

andypost’s picture

Reverted 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

andypost’s picture

dimitriskr’s picture

@andypost I just pushed the 10.6 and 10.11 versions to the related issue's MR, I forgot to do it before

andypost’s picture

I 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

fjgarlin’s picture

Thanks 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

catch’s picture

Let'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.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
SIMPLETEST_DB = mysql://drupaltestbot:drupaltestbotpw@database/mysql?module=mysql

proves 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.

  • catch committed 564732d6 on 10.2.x
    Issue #3385621 by fjgarlin, andypost, dimitriskr, longwave: [GitlabCI]...

  • catch committed a2c2025d on 11.x
    Issue #3385621 by fjgarlin, andypost, dimitriskr, longwave: [GitlabCI]...
catch’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andypost’s picture

Please close the MR