From b3d86bf9e9d1534e15242eebd65408aa80c76d5d Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:32:15 -0700 Subject: [PATCH 1/3] =?UTF-8?q?Setup=20=E2=86=92=20Set=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/files/test-plugin-update/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/files/test-plugin-update/setup.sh b/.github/files/test-plugin-update/setup.sh index a88ec6fb3d643..9953912ad8afa 100755 --- a/.github/files/test-plugin-update/setup.sh +++ b/.github/files/test-plugin-update/setup.sh @@ -2,7 +2,7 @@ set -eo pipefail -echo "::group::Setup database" +echo "::group::Set up database" cat < ~/.my.cnf [client] host=${MYSQL_HOST%:*} @@ -16,7 +16,7 @@ mysql -e "drop database if exists wordpress;" mysql -e "create database wordpress;" echo "::endgroup::" -echo "::group::Setup WordPress" +echo "::group::Set up WordPress" mkdir -p /var/log/php/ /var/scripts/ cd /var/www/html sed -i 's/apachectl -D FOREGROUND/apachectl start/' /usr/local/bin/run From 3d26f22023d93f72d36889f15c1028537f54cafe Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:50:04 -0700 Subject: [PATCH 2/3] Do a simple retry if WP download fails --- tools/docker/bin/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/docker/bin/run.sh b/tools/docker/bin/run.sh index 43a95261bef05..41e9163d30d9e 100755 --- a/tools/docker/bin/run.sh +++ b/tools/docker/bin/run.sh @@ -13,7 +13,11 @@ user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" # Download WordPress -[ -f /var/www/html/xmlrpc.php ] || wp core download +# Sometimes it fails, and a retry would be nice: +# https://github.com/wp-cli/core-command/pull/258 +# https://github.com/wp-cli/wp-cli/pull/6140 +# For now this should work well enough +[ -f /var/www/html/xmlrpc.php ] || wp core download || wp core download # Configure WordPress if [ ! -f /var/www/html/wp-config.php ]; then From a5d626ac579dbc655233d094b92803119810efd7 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:54:00 -0700 Subject: [PATCH 3/3] Add a variable sleep --- tools/docker/bin/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/bin/run.sh b/tools/docker/bin/run.sh index 41e9163d30d9e..4deda93642679 100755 --- a/tools/docker/bin/run.sh +++ b/tools/docker/bin/run.sh @@ -17,7 +17,7 @@ group="${APACHE_RUN_GROUP:-www-data}" # https://github.com/wp-cli/core-command/pull/258 # https://github.com/wp-cli/wp-cli/pull/6140 # For now this should work well enough -[ -f /var/www/html/xmlrpc.php ] || wp core download || wp core download +[ -f /var/www/html/xmlrpc.php ] || wp core download || sleep $(( 30 + RANDOM % 8 )) && wp core download # Configure WordPress if [ ! -f /var/www/html/wp-config.php ]; then