Skip to content

Commit

Permalink
Fixes #37081 - Add a setting to configure PAGE_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Jan 23, 2024
1 parent 297a48a commit 07a14e2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
# STATIC_URL setting. In reality this can also be just the path and doesn't
# have to be a full URL.
#
# @param page_size
# Configure the PAGE_SIZE setting for Pagination.
#
# @param postgresql_db_name
# Name of Pulp PostgreSQL database
#
Expand Down Expand Up @@ -220,6 +223,7 @@
String[1] $apache_vhost_priority = '10',
Stdlib::Absolutepath $api_socket_path = '/run/pulpcore-api.sock',
Stdlib::Absolutepath $content_socket_path = '/run/pulpcore-content.sock',
Optional[Integer[1]] $page_size = undef,
String $postgresql_db_name = 'pulpcore',
String $postgresql_db_user = 'pulp',
String $postgresql_db_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32)),
Expand Down
34 changes: 34 additions & 0 deletions spec/acceptance/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,40 @@ class { 'pulpcore':
end
end

describe 'PAGE_SIZE setting' do
context 'default PAGE_SIZE' 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.not_to match(/^REST_FRAMEWORK__PAGE_SIZE/) }
end
end

context 'Custom PAGE_SIZE' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'pulpcore':
page_size => 200,
}
PUPPET
end
end

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

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 8 - Pulp nightly

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos8-64-puppet8.example.com" +SECRET_KEY = "vpk6n9a7dHDPAmuYZVYZpasX8MFFqVpKsDV5Jw5hUXjoWVWBS7" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'hVoLvHTXieLCC7MsX7zMqKjTgLfzMbkK', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 8 - Pulp 3.39

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos8-64-puppet8.example.com" +SECRET_KEY = "SfoRxU5A3uaPrZKkQ7t8ASFqq8yqC3pJznh5ViuujjGcf7zKr8" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'YeoEGnKRedZamygvri2qnWFvizWTbmsq', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 8 - Pulp nightly

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos8-64-puppet7.example.com" +SECRET_KEY = "SvDQFMS4nNarZ9gqAsNGAtBYXRWffPuLXEaff2W9yJpMd9tqR4" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': '9Yzsc5QNjDk8EzKQiRYNi5EUBbo5etfE', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 8 - Pulp 3.39

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos8-64-puppet7.example.com" +SECRET_KEY = "hvoVFFcdnae6SkdSMVzJfm5odzHentygW6YyZoheJWQzJFh4ab" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'mMxKGHMVCi3JmuJEJn4YXzM2uz27RLRY', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "NdDdWPfQFzMhT4fWf2gKi6hb54X5XKPkFyx3Gm9Qa8GmwCEFfF" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': '9YHbgqCrotkNwPEXTdtfdNJht9zuLt7B', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp 3.39

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "H7MfiJaSNAGFiUgc7jGkV7Za3ii6d2yEdVmfaLuoupiqMpeuPC" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'NTNd69GUhwpKUeerRVeLvR32xvZFHDUj', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 9 - Pulp nightly

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos9-64-puppet7.example.com" +SECRET_KEY = "A97NsGWibLLQRgjRqgocWrbJH3cWZV8N5au3bLhMdwxpaMjHKJ" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'JoCinVELPs3MfnuAbqvQbeBUNWQjegzC', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 83 in spec/acceptance/settings_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 9 - Pulp 3.39

PAGE_SIZE setting Custom PAGE_SIZE File "/etc/pulp/settings.py" content is expected to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Failure/Error: its(:content) { is_expected.to match(/^REST_FRAMEWORK__PAGE_SIZE = 200$/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to match /^REST_FRAMEWORK__PAGE_SIZE = 200$/ Diff: @@ -1,76 +1,151 @@ -/^REST_FRAMEWORK__PAGE_SIZE = 200$/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# 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. +# TELEMETRY = False + +CONTENT_ORIGIN = "https://centos9-64-puppet7.example.com" +SECRET_KEY = "GidV7wSBcxHLXpxC5wGvJMWJgZHjMmbP5sLggvJRDEXCaS29PK" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': 'SjiYAC6fxZa88KLjToGXfu4WKUHt7vWK', + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] + +REST_FRAMEWORK__PAGE_SIZE = '200' +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication' +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +# IMPORT_WORKERS_PERCENT = 100 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}
end
end
end

describe 'HIDE_GUARDED_DISTRIBUTIONS setting' do
context 'default HIDE_GUARDED_DISTRIBUTIONS' do
it_behaves_like 'an idempotent resource' do
Expand Down
3 changes: 3 additions & 0 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ WORKING_DIRECTORY = "<%= scope['pulpcore::cache_dir'] %>"
REMOTE_USER_ENVIRON_NAME = '<%= scope['pulpcore::remote_user_environ_name'] %>'
AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend']

<% unless scope['pulpcore::page_size'].nil? -%>
REST_FRAMEWORK__PAGE_SIZE = '<%= scope['pulpcore::page_size'] %>'
<% end -%>
REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = (
'rest_framework.authentication.SessionAuthentication',
'pulpcore.app.authentication.PulpRemoteUserAuthentication'
Expand Down

0 comments on commit 07a14e2

Please sign in to comment.