Make WordPress Core


Ignore:
Timestamp:
12/04/2024 03:16:02 PM (15 months ago)
Author:
desrosj
Message:

Build/Test Tools: Support older MariaDB versions in local Docker environment.

Older versions of MariaDB did not contain the mariadb-admin command. This command is configured as the healthcheck used by the local Docker environment to confirm that the database container has successfully started and is reporting as “healthy”. The current result is a failure when starting the environment while using one of the affected older versions.

For MariaDB versions 10.3 and earlier, the mysqladmin command was used instead. Since WordPress still technically supports back to MariaDB 5.5, the local environment should support running these versions. This updates the environment configuration to take this into account when performing a healthcheck test.

The README file is also updated to reflect that the same workaround added in [57568] for MySQL <= 5.7 is required when using MariaDB 5.5 on an Apple silicon machine.

Props johnbillion.
See #62221.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docker-compose.yml

    r59279 r59484  
    8383
    8484    healthcheck:
    85       test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ]
     85      test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $?;; *) mariadb-admin ping -h localhost || exit $?;; esac; else mysqladmin ping -h localhost || exit $?; fi" ]
    8686      timeout: 5s
    8787      interval: 5s
Note: See TracChangeset for help on using the changeset viewer.