From e03e70569d495e64fac46e33f1a0bb92a93830c2 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Tue, 7 Apr 2026 15:16:14 -0300 Subject: [PATCH 1/2] experiment: enable domains on pulp default scenario --- .github/workflows/scripts/before_install.sh | 2 +- template_config.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index 58e74c759b..4c822a214a 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -50,7 +50,7 @@ legacy_component_name: "pulpcore" component_name: "core" component_version: "${COMPONENT_VERSION}" pulp_env: {"PULP_CA_BUNDLE": "/etc/pulp/certs/pulp_webserver.crt"} -pulp_settings: {"allowed_export_paths": ["/tmp"], "allowed_import_paths": ["/tmp"], "api_root": "/pulp/", "content_path_prefix": "/somewhere/else/", "csrf_trusted_origins": ["https://pulp:443"], "orphan_protection_time": 0, "task_diagnostics": ["memory"], "task_protection_time": 10, "tmpfile_protection_time": 10, "upload_protection_time": 10} +pulp_settings: {"allowed_export_paths": ["/tmp"], "allowed_import_paths": ["/tmp"], "api_root": "/pulp/", "content_path_prefix": "/somewhere/else/", "csrf_trusted_origins": ["https://pulp:443"], "distributed_publication_retention_period": 3, "domain_enabled": true, "orphan_protection_time": 0, "task_diagnostics": ["memory"], "task_protection_time": 10, "tmpfile_protection_time": 10, "upload_protection_time": 10} pulp_scheme: "https" image: name: "pulp" diff --git a/template_config.yml b/template_config.yml index 0cc39e313b..7c40fe72be 100644 --- a/template_config.yml +++ b/template_config.yml @@ -65,6 +65,7 @@ pulp_settings: task_protection_time: 10 tmpfile_protection_time: 10 upload_protection_time: 10 + domain_enabled: true pulp_settings_azure: MEDIA_ROOT: "" STORAGES: From df41208a4403ab1287a9d0f9de4905941618e75f Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Tue, 7 Apr 2026 15:19:00 -0300 Subject: [PATCH 2/2] wip: Fix pytest_plugin domain factory --- pulpcore/pytest_plugin.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pulpcore/pytest_plugin.py b/pulpcore/pytest_plugin.py index b5c5fc062b..101e783e45 100644 --- a/pulpcore/pytest_plugin.py +++ b/pulpcore/pytest_plugin.py @@ -630,17 +630,23 @@ def _settings_factory(storage_class=None, storage_settings=None): ] def get_installation_storage_option(key, backend): - value = pulp_settings.STORAGES["default"]["OPTIONS"].get(key) + value = pulp_settings.STORAGES["default"].get("OPTIONS", {}).get(key) + if value: + return value # Some FileSystem backend options may be defined in the top settings module - if backend == "pulpcore.app.models.storage.FileSystem" and not value: - value = getattr(pulp_settings, key, None) + if backend != "pulpcore.app.models.storage.FileSystem": + return None + value = getattr(pulp_settings, key, None) return value storage_settings = storage_settings or dict() storage_backend = storage_class or pulp_settings.STORAGES["default"]["BACKEND"] unset_storage_settings = (k for k in keys[storage_backend] if k not in storage_settings) for key in unset_storage_settings: - storage_settings[key] = get_installation_storage_option(key, storage_backend) + value = get_installation_storage_option(key, storage_backend) + if not value: + continue + storage_settings[key] = value return storage_backend, storage_settings return _settings_factory