17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [10.0.0](https://github.com/theforeman/puppet-pulpcore/tree/10.0.0) (2024-02-19)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/9.0.0...10.0.0)

**Breaking changes:**

- Fixes [\#37062](https://projects.theforeman.org/issues/37062) - Rename pulpcore::telemetry to pulpcore::analytics [\#326](https://github.com/theforeman/puppet-pulpcore/pull/326) ([wbclark](https://github.com/wbclark))

**Implemented enhancements:**

- Mark compatible with puppet/redis 10.x [\#330](https://github.com/theforeman/puppet-pulpcore/pull/330) ([ekohl](https://github.com/ekohl))

**Fixed bugs:**

- Ensure glibc-langpack-en is always installed [\#329](https://github.com/theforeman/puppet-pulpcore/pull/329) ([evgeni](https://github.com/evgeni))
- Drop pulpcore::plugin::migration [\#325](https://github.com/theforeman/puppet-pulpcore/pull/325) ([ekohl](https://github.com/ekohl))

## [9.0.0](https://github.com/theforeman/puppet-pulpcore/tree/9.0.0) (2023-11-28)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/8.6.0...9.0.0)
Expand Down
2 changes: 2 additions & 0 deletions manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
include postgresql::client
include postgresql::server
include postgresql::server::contrib
ensure_packages(['glibc-langpack-en'])
postgresql::server::db { $pulpcore::postgresql_db_name:
user => $pulpcore::postgresql_db_user,
password => postgresql::postgresql_password($pulpcore::user, $pulpcore::postgresql_db_password),
encoding => 'utf8',
locale => 'en_US.utf8',
before => Pulpcore::Admin['migrate --noinput'],
require => Package['glibc-langpack-en'],
}

postgresql::server::extension { "hstore for ${pulpcore::postgresql_db_name}":
Expand Down
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@
# @param loggers
# Configure additional loggers or override pre-defined logger configuration.
#
# @param telemetry
# Configure TELEMETRY in settings.yml, which controls the reporting of anonymous data to https://analytics.pulpproject.org/,
# @param analytics
# Configure ANALYTICS in settings.yml, which controls the reporting of anonymous data to https://analytics.pulpproject.org/,
# starting with Pulpcore version 3.21.0, to guide Pulp project developers. Set this to false to opt out of this anonymous reporting;
# if undef, it will instead be omitted from settings.yml and Pulp will report these usage statistics per its default behavior.
# Adding this configuration will have no effect in Pulp versions prior to the introduction of the telemetry feature.
# Originally, the pulp setting was called TELEMETRY and this param was called telemetry; it was renamed by the pulp developers.
#
# @param hide_guarded_distributions
# If activated, the distributions that are protected by a content guard will not be shown on the
Expand Down Expand Up @@ -254,7 +254,7 @@
Optional[Variant[Integer[1], Enum['None']]] $cache_expires_ttl = undef,
Pulpcore::LogLevel $log_level = 'INFO',
Hash[String[1], Pulpcore::Logger] $loggers = {},
Optional[Boolean] $telemetry = undef,
Optional[Boolean] $analytics = undef,
Optional[Boolean] $hide_guarded_distributions = undef,
Optional[Integer[1,100]] $import_workers_percent = undef,
) {
Expand Down
49 changes: 0 additions & 49 deletions manifests/plugin/migration.pp

This file was deleted.

4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-pulpcore",
"version": "9.0.0",
"version": "10.0.0",
"author": "theforeman",
"summary": "Installs next generation Pulp server",
"license": "GPL-3.0-or-later",
Expand All @@ -16,7 +16,7 @@
},
{
"name": "puppet/redis",
"version_requirement": ">= 5.0.0 < 10.0.0"
"version_requirement": ">= 5.0.0 < 11.0.0"
},
{
"name": "puppetlabs/apache",
Expand Down
29 changes: 7 additions & 22 deletions spec/acceptance/settings_spec.rb
Original file line number Diff line number Diff line change
@@ -1,52 +1,37 @@
require 'spec_helper_acceptance'

describe 'TELEMETRY setting' do
context 'default TELEMETRY' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
include pulpcore
PUPPET
end
end

describe file('/etc/pulp/settings.py') do
it { is_expected.to be_file }
its(:content) { is_expected.to match(/^# TELEMETRY = False$/) }
end
end

context 'TELEMETRY disabled' do
describe 'ANALYTICS setting' do
context 'ANALYTICS disabled' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'pulpcore':
telemetry => false,
analytics => false,
}
PUPPET
end
end

describe file('/etc/pulp/settings.py') do
it { is_expected.to be_file }
its(:content) { is_expected.to match(/^TELEMETRY = False$/) }
its(:content) { is_expected.to match(/^ANALYTICS = False$/) }
end
end

context 'TELEMETRY enabled' do
context 'ANALYTICS enabled' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'pulpcore':
telemetry => true,
analytics => true,
}
PUPPET
end
end

describe file('/etc/pulp/settings.py') do
it { is_expected.to be_file }
its(:content) { is_expected.to match(/^TELEMETRY = True$/) }
its(:content) { is_expected.to match(/^ANALYTICS = True$/) }
end
end
end
Expand Down
37 changes: 0 additions & 37 deletions spec/classes/plugin_migration_spec.rb

This file was deleted.

1 change: 1 addition & 0 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
.with_content(%r{ALLOWED_CONTENT_CHECKSUMS = \["sha224", "sha256", "sha384", "sha512"\]})
.with_content(%r{REDIS_URL = "redis://localhost:6379/8"})
.with_content(%r{CACHE_ENABLED = False})
.with_content(%r{# ANALYTICS = False})
.without_content(%r{sslmode})
.without_content(%r{WORKER_TTL})
is_expected.to contain_concat__fragment('logging').with_content(<<~LOGGING)
Expand Down
11 changes: 0 additions & 11 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
$major = $facts['os']['release']['major']

case $major {
'8': {
package { 'glibc-langpack-en':
ensure => installed,
}
}
default: {}
}

class { 'pulpcore::repo':
version => fact('pulpcore_version'),
}
Expand Down
22 changes: 0 additions & 22 deletions templates/migration-settings.py.erb

This file was deleted.

6 changes: 3 additions & 3 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is
# explicitly defined with value False. This data is used by the Pulp project
# to make informed, data-driven decisions about future feature development.
<% if scope['pulpcore::telemetry'].nil? -%>
# TELEMETRY = False
<% if scope['pulpcore::analytics'].nil? -%>
# ANALYTICS = False
<% else -%>
TELEMETRY = <%= scope.call_function('to_python', [scope['pulpcore::telemetry']]) %>
ANALYTICS = <%= scope.call_function('to_python', [scope['pulpcore::analytics']]) %>
<% end -%>

CONTENT_ORIGIN = "https://<%= scope['pulpcore::servername'] %>"
Expand Down