diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index e4eb4748c..f827e5ec5 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -95,7 +95,7 @@ if [ "$TEST" = "s3" ]; then sed -i -e '$a s3_test: true\ minio_access_key: "'$MINIO_ACCESS_KEY'"\ minio_secret_key: "'$MINIO_SECRET_KEY'"\ -pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "domain_enabled": true, "flatpak_index": false, "token_auth_disabled": true}\ +pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "domain_enabled": true, "enabled_plugins": ["pulp_file", "pulp_container"], "flatpak_index": false, "token_auth_disabled": true}\ pulp_scenario_env: {}\ ' vars/main.yaml export PULP_API_ROOT="/rerouted/djnd/" diff --git a/CHANGES/2044.bugfix b/CHANGES/2044.bugfix new file mode 100644 index 000000000..fbcf33281 --- /dev/null +++ b/CHANGES/2044.bugfix @@ -0,0 +1 @@ +Added a deployment check to produce a better error message when pulp_file missing from `ENABLED_PLUGINS`. diff --git a/pulp_container/app/dynaconf_hooks.py b/pulp_container/app/dynaconf_hooks.py new file mode 100644 index 000000000..a0560cfcc --- /dev/null +++ b/pulp_container/app/dynaconf_hooks.py @@ -0,0 +1,9 @@ +from dynaconf import ValidationError + + +def post(settings): + data = {"dynaconf_merge": True} + enabled_plugins = settings.get("ENABLED_PLUGINS") + if enabled_plugins and "pulp_file" not in enabled_plugins: + raise ValidationError("pulp_file must be enabled to use pulp_container") + return data diff --git a/template_config.yml b/template_config.yml index a556b3394..3bc717418 100644 --- a/template_config.yml +++ b/template_config.yml @@ -89,6 +89,9 @@ pulp_settings_s3: staticfiles: BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage domain_enabled: true + enabled_plugins: + - pulp_file + - pulp_container flatpak_index: false token_auth_disabled: true pydocstyle: true