Skip to content

Enforce mysql-client as a required dependency for magerun2 support - #114

Merged
peterjaap merged 3 commits into
mainfrom
copilot/add-mysql-client-dependency
Aug 10, 2026
Merged

Enforce mysql-client as a required dependency for magerun2 support#114
peterjaap merged 3 commits into
mainfrom
copilot/add-mysql-client-dependency

Conversation

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor

magerun2 database commands (db:info, db:dump, etc.) require mysql/mysqldump on PATH, but MageBox never checked for or installed mysql-client, causing silent failures.

Changes

Dependency detection

  • Added MysqlClientInstallCommand() to Platform with per-distro install commands (Homebrew/apt/dnf/pacman)

Installer interface & implementations

  • Added InstallMysqlClient() to the Installer interface and implemented across all platforms:
    • macOS: brew install mysql-client
    • Ubuntu/Debian: default-mysql-client
    • Fedora: community-mysql
    • Arch: mariadb-clients

magebox bootstrap (Step 1)

  • Checks for mysqldump on PATH alongside Docker/Nginx/mkcert
  • Includes mysql-client in the missing-deps prompt and auto-installs with user consent
  • On macOS, outputs a shell-aware note since mysql-client is a keg-only Homebrew formula:
    Note: mysql-client is keg-only on macOS. To add it to your PATH:
        echo 'export PATH="$(brew --prefix mysql-client)/bin:$PATH"' >> ~/.zshrc
    

magebox check

  • Added a mysql-client check in the magerun2 section that reports mysqldump availability and surfaces the install command on failure:
    ✗ mysql-client:       Not installed — run 'brew install mysql-client'
    

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack 'org/repo.git' (packet block)
  • nonexistent.invalid.host
    • Triggering command: /tmp/go-build2023940910/b374/teamserver.test /tmp/go-build2023940910/b374/teamserver.test -test.testlogfile=/tmp/go-build2023940910/b374/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add mysql-client as a required dependency for magerun2 Enforce mysql-client as a required dependency for magerun2 support May 12, 2026
Copilot AI requested a review from peterjaap May 12, 2026 08:20
Comment thread cmd/magebox/bootstrap.go Fixed
@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

📦 PR build artifacts

Built from b1b10a3view run. Artifacts expire in 14 days.

Note: artifact download links require being signed in to GitHub with access to this repository.

Copilot AI and others added 3 commits August 10, 2026 14:21
The post-install re-check assigned mysqlClientInstalled but nothing read it
afterwards (ineffassign), so a failed mysql-client install was silently
swallowed. mysql-client cannot join the fatal nginx/mkcert check: the Homebrew
formula is keg-only, so mysqldump is legitimately off PATH on macOS until the
user updates their shell profile. Warn instead.

Claude-Session: https://claude.ai/code/session_01Poy9UFYiKUkHeg3SAyxDWb
@peterjaap
peterjaap force-pushed the copilot/add-mysql-client-dependency branch from e34089d to e0c6acb Compare August 10, 2026 12:22
@peterjaap
peterjaap marked this pull request as ready for review August 10, 2026 12:38
@peterjaap
peterjaap merged commit 3af9600 into main Aug 10, 2026
12 checks passed
@peterjaap
peterjaap deleted the copilot/add-mysql-client-dependency branch August 10, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mysql-client not enforced as a dependency, causing magerun2 failures

2 participants