From 01f8caeb476ea52f11b648c637bcb2e7ab1944c9 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 20 Sep 2024 11:46:29 +0100 Subject: [PATCH 1/4] Upgrade github action upload artifact --- .github/workflows/vvv-provisioning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vvv-provisioning.yml b/.github/workflows/vvv-provisioning.yml index b2cdfa5e3..596128b92 100644 --- a/.github/workflows/vvv-provisioning.yml +++ b/.github/workflows/vvv-provisioning.yml @@ -104,7 +104,7 @@ jobs: MYGID=$(id -g -n) sudo chown -R $MYUID:$MYGID "$GITHUB_WORKSPACE/log" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: logs-on-docker From 85b83971efa7a8d5ec8a44ef91aeb4a75008eda1 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 20 Sep 2024 11:50:27 +0100 Subject: [PATCH 2/4] Update linters.yml --- .github/workflows/linters.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 4f6d1fb5d..1d55dcab2 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -9,10 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: YAML Lint - uses: ibiqlik/action-yamllint@v0.0.1 + uses: ibiqlik/action-yamllint@v3 with: file_or_dir: . - - name: PHP Syntax Checker (Lint) PHP 7.3 - uses: StephaneBour/actions-php-lint@7.3 + - name: PHP Syntax Checker (Lint) PHP 8.2 + uses: StephaneBour/actions-php-lint@8.2 with: dir: '.' + - name: Shell Script Syntax Checks + uses: Klintrup/simple-shell-syntax-check@v2 From dfe0a26595dfeccec28352613b2f7a00d7f29668 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 20 Sep 2024 12:52:38 +0100 Subject: [PATCH 3/4] If a network check fails, try it again without the quiet flag so that we can see the issue, also fix the listing of failed checks to show just the failed ones --- provision/provision-helpers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/provision/provision-helpers.sh b/provision/provision-helpers.sh index 966d1c682..68c11424b 100755 --- a/provision/provision-helpers.sh +++ b/provision/provision-helpers.sh @@ -78,6 +78,7 @@ function check_network_connection_to_host() { return 0 fi vvv_error " ! Network connection issues found. Unable to reach ${url}" + wget --spider --timeout=5 --tries=3 "${url}" return 1 } export -f check_network_connection_to_host @@ -119,7 +120,7 @@ function network_check() { vvv_error " " vvv_error "VVV tried to check several domains it needs for provisioning but ${#failed_hosts[@]} of ${#hosts_to_test[@]} failed:" vvv_error " " - for url in "${hosts_to_test[@]}"; do + for url in "${failed_hosts[@]}"; do echo -e "${CRESET} [${RED}x${CRESET}] ${url}${RED}|" done vvv_error " " From b747b6a3ba5439a3136e4ba03f51faf36747c9dc Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 20 Sep 2024 12:57:14 +0100 Subject: [PATCH 4/4] additional error checking on mariadb restart --- provision/core/mariadb/provision.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/provision/core/mariadb/provision.sh b/provision/core/mariadb/provision.sh index 1077c5a3b..bb6a83ef1 100644 --- a/provision/core/mariadb/provision.sh +++ b/provision/core/mariadb/provision.sh @@ -136,11 +136,20 @@ function mysql_setup() { # happens after a `vagrant halt`. Check to see if it's running before # deciding whether to start or restart. if service mariadb status > /dev/null; then - vvv_info " * Starting the mariadb service" - service mariadb restart + vvv_info " * Restarting the mariadb service" + if ! service mariadb restart; then + vvv_error " * Restarting the MariaDB failed! Fetching service status." + service mariadb status + exit 1 + fi else vvv_info " * Restarting mariadb service" service mariadb start + if ! service mariadb start; then + vvv_error " * Starting MariaDB failed! Fetching service status." + service mariadb status + exit 1 + fi fi # IMPORT SQL