From 941427a53636d8c19d3a9af485a27f69aae0f00b Mon Sep 17 00:00:00 2001 From: OxCom Date: Fri, 29 Mar 2024 15:32:07 +0100 Subject: [PATCH 1/3] Reolse #1580: support mariadb 11.x --- lib/puppet/provider/mysql.rb | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index ef750039f..e6ec5dad0 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -38,11 +38,29 @@ class Puppet::Provider::Mysql < Puppet::Provider ].join(':') # rubocop:disable Style/HashSyntax - commands :mysql_raw => 'mysql' - commands :mysqld => 'mysqld' - commands :mysqladmin => 'mysqladmin' + commands :mysql_client => 'mysql' + commands :mariadb_client => 'mariadb' + commands :mysqld_service => 'mysqld' + commands :mariadbd_service => 'mariadbd' + commands :mysql_admin => 'mysqladmin' + commands :mariadb_admin => 'mysqladmin' # rubocop:enable Style/HashSyntax + def self.mysql_raw(*args) + mysqld_version_string.scan(%r{mariadb}i) { return mariadb_client(*args) } + mysql_client(*args) + end + + def self.mysqld(*args) + mysqld_version_string.scan(%r{mariadb}i) { return mariadbd_service(*args) } + mysqld_service(*args) + end + + def self.mysqladmin(*args) + mysqld_version_string.scan(%r{mariadb}i) { return mariadb_admin(*args) } + mysql_admin(*args) + end + # Optional defaults file def self.defaults_file "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" if File.file?("#{Facter.value(:root_home)}/.my.cnf") From b3f3cd78bbfe7a5d1d1eb0a260e78228ae979a67 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 4 Apr 2024 17:10:31 +0200 Subject: [PATCH 2/3] Update mysql.rb --- lib/puppet/provider/mysql.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index e6ec5dad0..192bb92e8 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -43,7 +43,7 @@ class Puppet::Provider::Mysql < Puppet::Provider commands :mysqld_service => 'mysqld' commands :mariadbd_service => 'mariadbd' commands :mysql_admin => 'mysqladmin' - commands :mariadb_admin => 'mysqladmin' + commands :mariadb_admin => 'mariadb-admin' # rubocop:enable Style/HashSyntax def self.mysql_raw(*args) From 69ab329893eeae3a8e0480c557a600c495dafc61 Mon Sep 17 00:00:00 2001 From: Malik Parvez <84777619+malikparvez@users.noreply.github.com> Date: Tue, 2 Apr 2024 21:09:39 +0530 Subject: [PATCH 3/3] Fix mend to run on cron --- .github/workflows/mend.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mend.yml b/.github/workflows/mend.yml index b4100a5af..8b5b40184 100644 --- a/.github/workflows/mend.yml +++ b/.github/workflows/mend.yml @@ -1,9 +1,10 @@ name: "mend" on: - pull_request: - branches: - - "main" + pull_request_target: + types: + - opened + - synchronize schedule: - cron: "0 0 * * *" workflow_dispatch: