Skip to content

pdksync - (Maint) PDK Update #1467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
# Optional Input
channel: '#team-ia-bots'
channel: '#team-cat-bots'
name: 'GABot'
8 changes: 4 additions & 4 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
# - name: Run Static & Syntax Tests
# if: ${{ github.repository_owner == 'puppetlabs' }}
# run: |
# buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
- name: Run Static & Syntax Tests
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop

- name: Setup Spec Test Matrix
id: get-matrix
Expand Down
7 changes: 7 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
--relative
--no-parameter_types-check
--no-parameter_documentation-check
--no-legacy_facts-check
--no-top_scope_facts-check
--no-anchor_resource-check
--no-relative_classname_reference-check
--no-params_empty_string_assignment-check
9 changes: 9 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ Rakefile:
.travis.yml:
delete: true
changelog_since_tag: 'v11.0.3'
Rakefile:
extra_disabled_lint_checks:
- parameter_types
- parameter_documentation
- legacy_facts
- top_scope_facts
- anchor_resource
- relative_classname_reference
- params_empty_string_assignment
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def changelog_future_release
end

PuppetLint.configuration.send('disable_relative')
PuppetLint.configuration.send('disable_parameter_types')
PuppetLint.configuration.send('disable_parameter_documentation')
PuppetLint.configuration.send('disable_legacy_facts')
PuppetLint.configuration.send('disable_top_scope_facts')
PuppetLint.configuration.send('disable_anchor_resource')
PuppetLint.configuration.send('disable_relative_classname_reference')
PuppetLint.configuration.send('disable_params_empty_string_assignment')


if Bundler.rubygems.find_name('github_changelog_generator').any?
Expand All @@ -50,7 +57,6 @@ if Bundler.rubygems.find_name('github_changelog_generator').any?
config.user = "#{changelog_user}"
config.project = "#{changelog_project}"
config.since_tag = "v11.0.3"
config.max_issues = 500
config.future_release = "#{changelog_future_release}"
config.exclude_labels = ['maintenance']
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
Expand Down
8 changes: 3 additions & 5 deletions lib/facter/mysql_server_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ def mysql_id_get

Facter.add('mysql_server_id') do
setcode do
begin
mysql_id_get
rescue
nil
end
mysql_id_get
rescue
nil
end
end
2 changes: 1 addition & 1 deletion lib/puppet/provider/mysql_grant/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def self.instances
sorted_privileges = ['ALL']

# Currently there is an issue with the behaviour of the module which was highlighted by the 'complex test' test case in 'mysql_grant_spec'. The module, upon retrieving all privileges from an
# user, does not take into account that the latest version of mysql now includes dynamic privileges which are returned alongside the original static privileges and are set by 'ALL PRIVILEGES'
# user, does not take into account that the latest version of mysql now includes dynamic privileges which are returned alongside the original static privileges and are set by 'ALL PRIVILEGES'
# (shortened to 'ALL'). This is a workaround to remove the unnecesary privileges from the sorted_privileges list which is used to check for idempotency in test cases.
elsif sorted_privileges == ['ALL', 'APPLICATION_PASSWORD_ADMIN', 'AUDIT_ABORT_EXEMPT', 'AUDIT_ADMIN', 'AUTHENTICATION_POLICY_ADMIN', 'BACKUP_ADMIN', 'BINLOG_ADMIN', 'BINLOG_ENCRYPTION_ADMIN',
'CLONE_ADMIN', 'CONNECTION_ADMIN', 'ENCRYPTION_KEY_ADMIN', 'FLUSH_OPTIMIZER_COSTS', 'FLUSH_STATUS', 'FLUSH_TABLES', 'FLUSH_USER_RESOURCES',
Expand Down
2 changes: 1 addition & 1 deletion manifests/backup/mysqlbackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
'incremental_base' => 'history:last_backup',
'incremental_backup_dir' => $backupdir,
'user' => $backupuser,
'password' => $backuppassword_unsensitive
'password' => $backuppassword_unsensitive,
},
}
$options = mysql::normalise_and_deepmerge($default_options, $mysql::server::override_options)
Expand Down
9 changes: 3 additions & 6 deletions manifests/bindings.pp
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,11 @@
) inherits mysql::params {
case $::osfamily {
'Archlinux': {
if $java_enable { fail("::mysql::bindings::java cannot be managed by puppet on ${::facts['os']['family']}
as it is not in official repositories. Please disable java mysql binding.") }
if $java_enable { fail("::mysql::bindings::java cannot be managed by puppet on ${::facts['os']['family']} as it is not in official repositories. Please disable java mysql binding.") }
if $perl_enable { include 'mysql::bindings::perl' }
if $php_enable { warning("::mysql::bindings::php does not need to be managed by puppet on ${::facts['os']['family']}
as it is included in mysql package by default.") }
if $php_enable { warning("::mysql::bindings::php does not need to be managed by puppet on ${::facts['os']['family']} as it is included in mysql package by default.") }
if $python_enable { include 'mysql::bindings::python' }
if $ruby_enable { fail("::mysql::bindings::ruby cannot be managed by puppet on %{::facts['os']['family']}
as it is not in official repositories. Please disable ruby mysql binding.") }
if $ruby_enable { fail("::mysql::bindings::ruby cannot be managed by puppet on ${::facts['os']['family']} as it is not in official repositories. Please disable ruby mysql binding.") }
}

default: {
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
$xtrabackup_package_name_override = 'percona-xtrabackup-24'
}
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '20.04') >= 0) or
($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '11') >= 0){
($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '11') >= 0) {
$python_package_name = 'python3-mysqldb'
} else {
$python_package_name = 'python-mysqldb'
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@
],
"description": "MySQL module",
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
"template-ref": "heads/main-0-gf3911d3",
"pdk-version": "2.3.0"
"template-ref": "heads/main-0-g806810b",
"pdk-version": "2.4.0"
}