Repository navigation
feat: support database config key for MySQL version selection - #160
Merged
Merged
Conversation
Allow users to set the database type and version via the recipe-level `database` config key (e.g., `database: mysql:8.0`), matching the behavior of the drupal recipe. Previously the database was hardcoded to mysql:5.7, ignoring user configuration. Default changed to mysql:8.0 to match Acquia Cloud's current standard. Closes #138
✅ Deploy Preview for lando-acquia ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add acquia-mysql8 example (explicit mysql:8.0 config) - Add acquia-mysql57 example (override default to mysql:5.7) - Add database-config.spec.js unit test verifying default config
Reverts the default back to mysql:5.7. Changing it to 8.0 would silently upgrade existing users' databases on rebuild. Users who want MySQL 8 can opt in via the database config key. Also fixes docs which incorrectly claimed mysql:8.0 as default.
|
Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.
Or push these changes by commenting: Preview (081f41929c)diff --git a/builders/acquia.js b/builders/acquia.js
--- a/builders/acquia.js
+++ b/builders/acquia.js
@@ -66,8 +66,7 @@
*/
constructor(id, options = {}) {
options = _.merge({}, config, options);
- // Set default database if not specified, and standard Acquia webroot and env file
- if (!options.database) options.database = 'mysql:8.0';
+ // Set standard Acquia webroot and env file
options.env_file = ['.env'];
options.webroot = 'docroot'; |
Use the standard leia pattern with startup, verification, and destroy sections containing bash test cases named by comments.
…lone examples acquia-default already tests the mysql:5.7 default. acquia-custom now sets database: mysql:8.0 and verifies it, covering the override case. Removed the standalone acquia-mysql8 and acquia-mysql57 examples.
The _.merge() on line 68 already populates options.database from the config defaults, so the if (!options.database) guard was dead code. The default is set in the config block; no runtime fallback needed. Addresses Bugbot review feedback.
The checklinks plugin fails on the double-301 redirect from docs.lando.dev/plugins/mysql/ → netlify → /index.html
Added a fix for the issue with the `database` config key being disregarded in the unreleased version.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Allow users to set the database type and version via the recipe-level
databaseconfig key, matching the behavior of thelando/drupalrecipe.Problem
The database was hardcoded to
mysql:5.7inbuilders/acquia.js(line 70), ignoring any user-provideddatabaseconfiguration in.lando.yml. The docs already documenteddatabaseas a config option, but the code didn't respect it.Changes
builders/acquia.js: Addeddatabase: 'mysql:8.0'to the default config block. Changed the hardcoded assignment to a conditional default (if (!options.database)), so user config is respected.docs/config.md: Added a "Choosing a database version" section documenting the config key with examples.Usage
Or for MySQL 8:
Closes #138
Note
Low Risk
Small configuration/defaulting change plus documentation/test updates; risk is limited to how the database service version is selected during app startup.
Overview
The Acquia recipe now respects the user-provided
config.databasevalue instead of overwriting it during builder initialization, withmysql:5.7defined as the default in the recipe config.Docs and examples were updated to describe selecting a MySQL version via
database, the custom example now pinsmysql:8.0, and a small test was added to assert the defaultdatabasevalue. The changelog records the fix.Written by Cursor Bugbot for commit 25843fd. This will update automatically on new commits. Configure here.