Skip to content

Commit d42faf1

Browse files
mdellwegevgenipedro-psb
committed
Check for pulp_file in ENABLED_PLUGINS
fixes #2044 Co-authored-by: Evgeni Golov <[email protected]> Co-authored-by: Pedro Brochado <[email protected]>
1 parent b9606cb commit d42faf1

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.github/workflows/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ if [ "$TEST" = "s3" ]; then
9595
sed -i -e '$a s3_test: true\
9696
minio_access_key: "'$MINIO_ACCESS_KEY'"\
9797
minio_secret_key: "'$MINIO_SECRET_KEY'"\
98-
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}\
98+
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}\
9999
pulp_scenario_env: {}\
100100
' vars/main.yaml
101101
export PULP_API_ROOT="/rerouted/djnd/"

CHANGES/2044.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a deployment check to produce a better error message when pulp_file missing from `ENABLED_PLUGINS`.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from dynaconf import ValidationError
2+
3+
4+
def post(settings):
5+
data = {"dynaconf_merge": True}
6+
enabled_plugins = settings.get("ENABLED_PLUGINS")
7+
if enabled_plugins and "pulp_file" not in enabled_plugins:
8+
raise ValidationError("pulp_file must be enabled to use pulp_container")
9+
return data

template_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ pulp_settings_s3:
8989
staticfiles:
9090
BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage
9191
domain_enabled: true
92+
enabled_plugins:
93+
- pulp_file
94+
- pulp_container
9295
flatpak_index: false
9396
token_auth_disabled: true
9497
pydocstyle: true

0 commit comments

Comments
 (0)