From 1322d5c013735bc11a295c7a350d4965f9febc0a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 4 Dec 2024 11:48:57 -0500 Subject: [PATCH 1/5] Remove exclude for MySQL 8.4 in upgrade tests. This was in place previously because the Docker environment failed. This has been fixed. --- .github/workflows/upgrade-testing.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 8ea2c16bfb36a..a9e00ce6d05d9 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -75,11 +75,6 @@ jobs: wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7' ] multisite: [ false, true ] - exclude: - - php: '7.2' - db-version: '8.4' - - php: '7.3' - db-version: '8.4' with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -104,11 +99,6 @@ jobs: wp: [ '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ] multisite: [ false, true ] - exclude: - - php: '7.2' - db-version: '8.4' - - php: '7.3' - db-version: '8.4' with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -160,11 +150,6 @@ jobs: wp: [ '4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9' ] multisite: [ false, true ] - exclude: - - php: '7.2' - db-version: '8.4' - - php: '7.3' - db-version: '8.4' with: os: ${{ matrix.os }} php: ${{ matrix.php }} From 2fe47c89658416ce98efb1687c952277290e5225 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 4 Dec 2024 11:51:43 -0500 Subject: [PATCH 2/5] Add better inline docs for each exclusion. --- .github/workflows/install-testing.yml | 10 ++++++---- .github/workflows/phpunit-tests.yml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index ca03ebd518a00..7a8c8b40c11b4 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -78,15 +78,17 @@ jobs: # Exclude some PHP and MySQL versions that cannot currently be tested with Docker containers. exclude: + # There are no local WordPress Docker environment containers for PHP <= 5.3. - php: '5.2' - php: '5.3' + # MySQL containers <= 5.5 do not exist or fail to start properly. - db-version: '5.0' + db-type: 'mysql' - db-version: '5.1' + db-type: 'mysql' - db-version: '5.5' - - php: '7.2' - db-version: '8.4' - - php: '7.3' - db-version: '8.4' + db-type: 'mysql' + # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218. - php: '7.2' db-version: '9.0' - php: '7.3' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 949e08d5339ca..62e83b58a6571 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -93,7 +93,7 @@ jobs: report: true exclude: - # MySQL 9.0+ will not work on PHP 7.2 & 7.3 + # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218. - php: '7.2' db-version: '9.0' - php: '7.3' From 7999dc5292f452fd9968bc840c17c6056f3b4b6a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 4 Dec 2024 12:16:25 -0500 Subject: [PATCH 3/5] Ensure MySQL 8.4 container can start. --- .github/workflows/install-testing.yml | 2 +- .github/workflows/reusable-upgrade-testing.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 7a8c8b40c11b4..34d735b2ffb95 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -107,7 +107,7 @@ jobs: -e MYSQL_ROOT_PASSWORD="root" -e MYSQL_DATABASE="test_db" --entrypoint sh ${{ matrix.db-type }}:${{ matrix.db-version }} - -c "exec docker-entrypoint.sh mysqld${{ matrix.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" + -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && '--authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" steps: - name: Set up PHP ${{ matrix.php }} diff --git a/.github/workflows/reusable-upgrade-testing.yml b/.github/workflows/reusable-upgrade-testing.yml index 1d4f26f91ad2c..cb0e1c6d020cc 100644 --- a/.github/workflows/reusable-upgrade-testing.yml +++ b/.github/workflows/reusable-upgrade-testing.yml @@ -65,7 +65,7 @@ jobs: -e MYSQL_ROOT_PASSWORD="root" -e MYSQL_DATABASE="test_db" --entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }} - -c "exec docker-entrypoint.sh mysqld${{ inputs.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), inputs.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" + -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && '--authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" steps: - name: Set up PHP ${{ inputs.php }} From 9746e5e68447ee5757f6f2f30b5bf6108667556b Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 4 Dec 2024 15:01:32 -0500 Subject: [PATCH 4/5] Try specifying a volume with a .conf file. --- .github/workflows/install-testing.yml | 2 ++ .github/workflows/reusable-upgrade-testing.yml | 2 ++ tools/local-env/old-php-mysql-84.override.yml | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 34d735b2ffb95..1c5efc8b4fbec 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -99,6 +99,8 @@ jobs: image: ${{ matrix.db-type }}:${{ matrix.db-version }} ports: - 3306 + volumes: + - ${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && './tools/local-env/mysql-old-php.conf:/etc/mysql/conf.d/config-file.cnf' || './tools/local-env/mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql' }} options: >- --health-cmd="mysqladmin ping" --health-interval="30s" diff --git a/.github/workflows/reusable-upgrade-testing.yml b/.github/workflows/reusable-upgrade-testing.yml index cb0e1c6d020cc..506428bb6a67c 100644 --- a/.github/workflows/reusable-upgrade-testing.yml +++ b/.github/workflows/reusable-upgrade-testing.yml @@ -57,6 +57,8 @@ jobs: image: ${{ inputs.db-type }}:${{ inputs.db-version }} ports: - 3306 + volumes: + - ${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && './tools/local-env/mysql-old-php.conf:/etc/mysql/conf.d/config-file.cnf' || './tools/local-env/mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql' }} options: >- --health-cmd="mysqladmin ping" --health-interval="30s" diff --git a/tools/local-env/old-php-mysql-84.override.yml b/tools/local-env/old-php-mysql-84.override.yml index 3eca65f3c1c0e..b1d39be9b8be2 100644 --- a/tools/local-env/old-php-mysql-84.override.yml +++ b/tools/local-env/old-php-mysql-84.override.yml @@ -3,3 +3,8 @@ services: mysql: volumes: - ./tools/local-env/mysql-old-php.conf:/etc/mysql/conf.d/config-file.cnf + + # This is currently only used in the upgrade and installation test GitHub Action workflows. + database: + volumes: + - ./tools/local-env/mysql-old-php.conf:/etc/mysql/conf.d/config-file.cnf From 1abc97f5fac69923f67c2ec5d6911c190ec7603b Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 4 Dec 2024 16:50:18 -0500 Subject: [PATCH 5/5] Add missing space. --- .github/workflows/install-testing.yml | 2 +- .github/workflows/reusable-upgrade-testing.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 1c5efc8b4fbec..5a44ebd0338f9 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -109,7 +109,7 @@ jobs: -e MYSQL_ROOT_PASSWORD="root" -e MYSQL_DATABASE="test_db" --entrypoint sh ${{ matrix.db-type }}:${{ matrix.db-version }} - -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && '--authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" + -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && ' --authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" steps: - name: Set up PHP ${{ matrix.php }} diff --git a/.github/workflows/reusable-upgrade-testing.yml b/.github/workflows/reusable-upgrade-testing.yml index 506428bb6a67c..dddb4e7e6dbb9 100644 --- a/.github/workflows/reusable-upgrade-testing.yml +++ b/.github/workflows/reusable-upgrade-testing.yml @@ -67,7 +67,7 @@ jobs: -e MYSQL_ROOT_PASSWORD="root" -e MYSQL_DATABASE="test_db" --entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }} - -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && '--authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" + -c "exec docker-entrypoint.sh mysqld${{ contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && '8.4' == matrix.db-version && ' --authentication-policy=mysql_native_password' || contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}" steps: - name: Set up PHP ${{ inputs.php }}