data.gov
data.gov copied to clipboard
backup-manager mysql db restore test failure
Upgrading the alpine image from 3.14 to 3.20 in the backup-manager app installs mysql-client
as MariaDB Ver 15.1 Distrib 10.11.8-MariaDB
instead of Ver 14.14 Distrib 5.7.44, for Linux (x86_64)
. This causes the restore mysql test to fail (failing assertion).
✗ mysql backup and restore
(from function `assert_success' in file test/test_helper/bats-assert/src/assert_success.bash, line 42,
in test file test/test_mysql.bats, line 31)
`assert_success' failed
{
"Location": "/datastore-backup-test"
}
-- command failed --
status : 1
output (6 lines):
restoring application-mysql-db (mysql) from /mysql-backup.sql.gz...
ERROR at line 1: Unknown command '\-'.
real 0m0.640s
user 0m0.622s
sys 0m0.093s
--
delete: s3://datastore-backup-test/mysql-backup.sql.gz
remove_bucket: datastore-backup-test
Background
- related to #4880
- alpine 3.20 installs 16.x pg client which is compatible with 15.x pg server
How to reproduce
- Change the alpine version from 3.14 to 3.20 in the app dockerfile
- run tests
Expected behavior
test pass
Actual behavior
test fail
Links
- https://github.com/drush-ops/drush/issues/6027
- https://gorannikolovski.com/blog/mariadb-import-issue-error-at-line-1-unknown-command
- https://wiki.alpinelinux.org/wiki/MariaDB#:~:text=The%20Alpine%20Linux%20repositories%20no%20longer%20include%20the%20actual%20MySQL%20binaries%2C%20installing%20the%20mysql%2D*%20packages%20will%20instead%20install%20MariaDB.
[Notes or a checklist reflecting our understanding of the selected approach]