From 7f22e2d9e534882cc3f532502e2d8f7cca2c5848 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 19 Feb 2026 17:16:36 -0600 Subject: [PATCH 1/3] test: add MySQL 5.7 SSL connectivity test for Backdrop recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproduces lando/lando#3833 — Backdrop recipe with MySQL 5.7 where mysql/mysqldump commands from the appserver fail with TLS/SSL errors due to self-signed certificates. --- .github/workflows/pr-backdrop-tests.yml | 1 + examples/backdrop-mysql57/.lando.yml | 10 ++++ examples/backdrop-mysql57/README.md | 74 +++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 examples/backdrop-mysql57/.lando.yml create mode 100644 examples/backdrop-mysql57/README.md diff --git a/.github/workflows/pr-backdrop-tests.yml b/.github/workflows/pr-backdrop-tests.yml index 24ed37c..a5d5c13 100644 --- a/.github/workflows/pr-backdrop-tests.yml +++ b/.github/workflows/pr-backdrop-tests.yml @@ -22,6 +22,7 @@ jobs: - examples/backdrop-mariadb - examples/backdrop-mysql8 - examples/backdrop-mysql-client + - examples/backdrop-mysql57 - examples/backdrop-nginx lando-version: - 3-edge diff --git a/examples/backdrop-mysql57/.lando.yml b/examples/backdrop-mysql57/.lando.yml new file mode 100644 index 0000000..2e0b07a --- /dev/null +++ b/examples/backdrop-mysql57/.lando.yml @@ -0,0 +1,10 @@ +name: backdrop-mysql57 +recipe: backdrop +config: + php: '8.4' + database: mysql:5.7 + webroot: web + +# do not remove this +plugins: + "@lando/backdrop": ../.. diff --git a/examples/backdrop-mysql57/README.md b/examples/backdrop-mysql57/README.md new file mode 100644 index 0000000..4edb96f --- /dev/null +++ b/examples/backdrop-mysql57/README.md @@ -0,0 +1,74 @@ +# Backdrop MySQL 5.7 SSL Test + +This example tests that the backdrop recipe with MySQL 5.7 correctly handles +database client connectivity. MySQL 5.7 uses self-signed certificates that can +cause TLS/SSL errors with the MySQL 8.0 client. + +See: https://github.com/lando/lando/issues/3833 + +## Start up tests + +Run the following commands to get up and running with this example. + +```bash +# Should download and extract Backdrop +lando poweroff +rm -rf web && mkdir -p web +curl -fsSL https://github.com/backdrop/backdrop/releases/download/1.33.1/backdrop.zip -o /tmp/backdrop.zip +unzip -q /tmp/backdrop.zip -d web +mv web/backdrop/* web/backdrop/.* web/ 2>/dev/null || true +rmdir web/backdrop 2>/dev/null || true +``` + +```bash +# Should start up successfully +lando start +``` + +```bash +# Should install Backdrop with bee +cd web && chmod +x core/scripts/* +lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL 5.7 Test" --auto +``` + +## Verification commands + +Run the following commands to validate things are rolling as they should. + +```bash +# Should auto-detect MySQL and install the MySQL client (not MariaDB) +lando exec appserver -- mysql --version | grep -qiv "MariaDB" +``` + +```bash +# Should be able to connect to MySQL 5.7 without SSL errors +lando mysql backdrop -e "SELECT 1" +``` + +```bash +# Should be able to run mysql from appserver without SSL errors +lando exec appserver -- mysql -h database -u backdrop -pbackdrop backdrop -e "SELECT 1" +``` + +```bash +# Should be able to export with bee without SSL errors +cd web +lando bee db-export /tmp/bee-export.sql +lando exec appserver -- bash -c "zcat /tmp/bee-export.sql.gz | head -5" | grep -i "dump" +``` + +```bash +# Should be able to export with db-export without SSL errors +lando db-export --stdout > /tmp/lando-export.sql +head -5 /tmp/lando-export.sql | grep -i "dump" +``` + +## Destroy tests + +Run the following commands to trash this app like nothing ever happened. + +```bash +# Should be destroyed with success +lando destroy -y +lando poweroff +``` From d9a60833bf6a264c80ea3a30bf41abaf928ec62e Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 19 Feb 2026 18:48:01 -0600 Subject: [PATCH 2/3] test: use bare 'database: mysql' with no version to match user's scenario The reporter used the default MySQL version (no version pinned), which is the more realistic test case. --- examples/backdrop-mysql57/.lando.yml | 2 +- examples/backdrop-mysql57/README.md | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/backdrop-mysql57/.lando.yml b/examples/backdrop-mysql57/.lando.yml index 2e0b07a..088fed1 100644 --- a/examples/backdrop-mysql57/.lando.yml +++ b/examples/backdrop-mysql57/.lando.yml @@ -2,7 +2,7 @@ name: backdrop-mysql57 recipe: backdrop config: php: '8.4' - database: mysql:5.7 + database: mysql webroot: web # do not remove this diff --git a/examples/backdrop-mysql57/README.md b/examples/backdrop-mysql57/README.md index 4edb96f..1fc7fca 100644 --- a/examples/backdrop-mysql57/README.md +++ b/examples/backdrop-mysql57/README.md @@ -1,8 +1,9 @@ -# Backdrop MySQL 5.7 SSL Test +# Backdrop MySQL Default Version SSL Test -This example tests that the backdrop recipe with MySQL 5.7 correctly handles -database client connectivity. MySQL 5.7 uses self-signed certificates that can -cause TLS/SSL errors with the MySQL 8.0 client. +This example tests that the backdrop recipe with `database: mysql` (no version +specified, using whatever the default is) correctly handles database client +connectivity. This matches the real-world scenario where users just set +`database: mysql` without pinning a version. See: https://github.com/lando/lando/issues/3833 @@ -28,7 +29,7 @@ lando start ```bash # Should install Backdrop with bee cd web && chmod +x core/scripts/* -lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL 5.7 Test" --auto +lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL Default Test" --auto ``` ## Verification commands From bac7c74411da535a09564b16b3e4a8f4d4ec347f Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 19 Feb 2026 21:56:33 -0600 Subject: [PATCH 3/3] feat: promote npm edge tag to latest when prerelease is promoted Adds a 'released' trigger to the release workflow with a lightweight 'promote' job that runs npm dist-tag to move 'latest' to the current version when a prerelease is promoted to a full release. The existing publish pipeline remains gated to 'published' events only. --- .github/workflows/pr-backdrop-tests.yml | 1 - .github/workflows/release.yml | 25 ++++++++- examples/backdrop-mysql57/.lando.yml | 10 ---- examples/backdrop-mysql57/README.md | 75 ------------------------- 4 files changed, 24 insertions(+), 87 deletions(-) delete mode 100644 examples/backdrop-mysql57/.lando.yml delete mode 100644 examples/backdrop-mysql57/README.md diff --git a/.github/workflows/pr-backdrop-tests.yml b/.github/workflows/pr-backdrop-tests.yml index a5d5c13..24ed37c 100644 --- a/.github/workflows/pr-backdrop-tests.yml +++ b/.github/workflows/pr-backdrop-tests.yml @@ -22,7 +22,6 @@ jobs: - examples/backdrop-mariadb - examples/backdrop-mysql8 - examples/backdrop-mysql-client - - examples/backdrop-mysql57 - examples/backdrop-nginx lando-version: - 3-edge diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d424fe5..bfe2b88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,32 @@ on: release: types: - published - + - released jobs: + # When a prerelease is promoted to a full release, update the npm latest tag + promote: + if: github.event.action == 'released' + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Install node 20 + uses: actions/setup-node@v6 + with: + node-version: '20' + registry-url: https://registry.npmjs.org + - name: Promote edge to latest + run: | + VERSION=$(echo "$TAG_NAME" | sed 's/^v//') + PACKAGE=$(node -p "require('./package.json').name") + npm dist-tag add "$PACKAGE@$VERSION" latest + echo "::notice title=Promoted $VERSION to latest::The latest tag now points to $VERSION (was edge-only)" + env: + TAG_NAME: ${{ github.event.release.tag_name }} + NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}} + deploy: + if: github.event.action == 'published' runs-on: ${{ matrix.os }} env: TERM: xterm diff --git a/examples/backdrop-mysql57/.lando.yml b/examples/backdrop-mysql57/.lando.yml deleted file mode 100644 index 088fed1..0000000 --- a/examples/backdrop-mysql57/.lando.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: backdrop-mysql57 -recipe: backdrop -config: - php: '8.4' - database: mysql - webroot: web - -# do not remove this -plugins: - "@lando/backdrop": ../.. diff --git a/examples/backdrop-mysql57/README.md b/examples/backdrop-mysql57/README.md deleted file mode 100644 index 1fc7fca..0000000 --- a/examples/backdrop-mysql57/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Backdrop MySQL Default Version SSL Test - -This example tests that the backdrop recipe with `database: mysql` (no version -specified, using whatever the default is) correctly handles database client -connectivity. This matches the real-world scenario where users just set -`database: mysql` without pinning a version. - -See: https://github.com/lando/lando/issues/3833 - -## Start up tests - -Run the following commands to get up and running with this example. - -```bash -# Should download and extract Backdrop -lando poweroff -rm -rf web && mkdir -p web -curl -fsSL https://github.com/backdrop/backdrop/releases/download/1.33.1/backdrop.zip -o /tmp/backdrop.zip -unzip -q /tmp/backdrop.zip -d web -mv web/backdrop/* web/backdrop/.* web/ 2>/dev/null || true -rmdir web/backdrop 2>/dev/null || true -``` - -```bash -# Should start up successfully -lando start -``` - -```bash -# Should install Backdrop with bee -cd web && chmod +x core/scripts/* -lando bee site-install --db-name=backdrop --db-user=backdrop --db-pass=backdrop --db-host=database --username=admin --password=admin --email=test@lando.dev --site-name="MySQL Default Test" --auto -``` - -## Verification commands - -Run the following commands to validate things are rolling as they should. - -```bash -# Should auto-detect MySQL and install the MySQL client (not MariaDB) -lando exec appserver -- mysql --version | grep -qiv "MariaDB" -``` - -```bash -# Should be able to connect to MySQL 5.7 without SSL errors -lando mysql backdrop -e "SELECT 1" -``` - -```bash -# Should be able to run mysql from appserver without SSL errors -lando exec appserver -- mysql -h database -u backdrop -pbackdrop backdrop -e "SELECT 1" -``` - -```bash -# Should be able to export with bee without SSL errors -cd web -lando bee db-export /tmp/bee-export.sql -lando exec appserver -- bash -c "zcat /tmp/bee-export.sql.gz | head -5" | grep -i "dump" -``` - -```bash -# Should be able to export with db-export without SSL errors -lando db-export --stdout > /tmp/lando-export.sql -head -5 /tmp/lando-export.sql | grep -i "dump" -``` - -## Destroy tests - -Run the following commands to trash this app like nothing ever happened. - -```bash -# Should be destroyed with success -lando destroy -y -lando poweroff -```