Repository navigation
ci: Pass MySQL matrix flags to the custom actions via env - #597
Merged
Merged
Conversation
Composite actions cannot read the `matrix` context, and the matrix from versions-matrix.R has flat keys, so `matrix.config.mysql_server` and `matrix.config.mysql_client` were always empty. versions-matrix.R now emits the flags through its `env` field, which R-CMD-check.yaml writes to $GITHUB_ENV before the custom actions run: `RMARIADB_CI_MYSQL_CLIENT`, `RMARIADB_CI_MYSQL_SERVER`, `RMARIADB_FORCE_MARIADBCONFIG` and `RMARIADB_FORCE_MYSQLCONFIG`. The custom actions compare against the string `'true'`, since the strings "true" and "false" are both truthy. Closes #592. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
Use `brew --prefix` for the macOS client paths, so that they also work on arm64 runners. Prepend the Homebrew mysql-client to $GITHUB_PATH after the server setup and fail if mysql_config comes from elsewhere. Force mysql_config on the Linux MySQL-client rows. Check that the server flavor matches the matrix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
Move the Homebrew mysql-client step after the database setup and flavor check, so that the MariaDB CLI is used against the MariaDB server: root there uses unix_socket auth, which the MySQL 9 client cannot use. Also harden the step (missing mysql_config, quoted GITHUB_PATH) and avoid grep in a pipe under pipefail in the flavor check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
Closed
3 tasks
Member
Author
|
Matrix run status for this PR (dispatched, since PRs from this repository run only the smoke test).
Generated by Claude Code |
This was referenced Nov 29, 2026
… on macOS `mysql_config --libs` lists -lzstd -lssl -lcrypto without any -L for them, so linking RMariaDB.so failed with "library 'zstd' not found". Apple's ld honors LIBRARY_PATH, which the compiler driver reads from the environment. Also add the keg-only openssl@3 lib directory. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
… macOS MariaDB's root@localhost uses unix_socket auth, which libmysqlclient does not support. Create a mysql_native_password user and point the [rs-dbi] group of ~/.my.cnf at it over TCP. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
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.
Closes #592.
The custom before-install and after-install actions gated their steps on
matrix.config.*, which composite actions cannot read, so every Linux job installed MariaDB 11.8 with libmariadb. The "MySQL server" and "MySQL client" jobs never tested MySQL.Changes:
.github/versions-matrix.Rnow passes the flags through the genericenvfield of the matrix.R-CMD-check.yamlalready writes that field to$GITHUB_ENVbefore the custom actions run. The new variables areRMARIADB_CI_MYSQL_SERVERandRMARIADB_CI_MYSQL_CLIENT;RMARIADB_FORCE_MARIADBCONFIGandRMARIADB_FORCE_MYSQLCONFIGnow also travel throughenv.The composite actions test
env.RMARIADB_CI_MYSQL_* == 'true'explicitly. The old conditions were also wrong because the string"false"is truthy.The "Define client restrictons" step is removed. It only echoed the empty
matrix.configvalues.On macOS, the client paths come from
brew --prefixinstead of hard-coded Intel paths. The MySQL-client job puts mysql-client'sbinfirst on$GITHUB_PATHafter the server setup, and fails ifmysql_configresolves anywhere else.The Linux MySQL-client rows set
RMARIADB_FORCE_MYSQLCONFIG=1, soconfigurefails instead of falling back tomariadb_config.A new step checks
SELECT VERSION()againstRMARIADB_CI_MYSQL_SERVER, so a job can no longer silently test the wrong server.R-CMD-check.yamlis unchanged; it is synced from a template.On macOS, the server-side setup runs with the MariaDB CLI before the MySQL client is put first on
PATH. MariaDB'srootlogs in only viaunix_socket, which the MySQL client cannot use.The macOS MySQL-client job adds Homebrew's
libandopenssl@3directories toLIBRARY_PATH, becausemysql_config --libslists-lzstd -lssl -lcryptowithout a-L. It also creates a throwawaymysql_native_passworduser, and points the[rs-dbi]group of~/.my.cnfat it over TCP.Merge order: #628 first. The macOS
mysql_configjob builds against Homebrew'smysql-client26.10. Onmainthe build fails against it (#626), and #628 fixes that. Until #628 is merged, that one job stays red on this branch.CI evidence, from full-matrix runs dispatched manually, because PRs from this repository run only the smoke test:
SELECT VERSION()=8.4.13-0ubuntu0.26.04.2) and passes. "MariaDB server, MySQL client" builds with the MySQL 8.4 client (Using mysql_config (forced)) and passes. Before this PR, both silently used MariaDB.claude/ci-mysql-26-check(this PR merged with fix: Detect MariaDB Connector/C by its macros, not by version number #628, not for merging): the macOSmysql_configjob passes R CMD check against MariaDB 11.8 throughmysql-client26.10, with 8625 tests passing and 0 failing.Review: one clean-review round found a High (the Intel-only Homebrew path) and a Medium (MariaDB's
mysql_configshadowing the MySQL one). Both are fixed. The second round found nothing above Low, and its Lows are fixed. The later commits fix what the real runs uncovered.https://claude.ai/code/session_01Hr1rd7atAZVq1J42WzXJpS
Generated by Claude Code