From 7779872cda21a8e663ab6eeb6f01f885c933026a Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Mon, 16 Feb 2026 15:55:15 -0500 Subject: [PATCH] Migrate to Django 5 STORAGES and get_domain() Assisted by: cursor composer-1.5 Co-authored-by: Cursor --- .github/workflows/scripts/install.sh | 4 ++-- template_config.yml | 29 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index fa7c75d42..af078d2ce 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: {"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, "flatpak_index": false, "token_auth_disabled": true}\ pulp_scenario_env: {}\ ' vars/main.yaml export PULP_API_ROOT="/rerouted/djnd/" @@ -109,7 +109,7 @@ if [ "$TEST" = "azure" ]; then - ./azurite:/etc/pulp\ command: "azurite-blob --skipApiVersionCheck --blobHost 0.0.0.0"' vars/main.yaml sed -i -e '$a azure_test: true\ -pulp_scenario_settings: {"content_origin": null, "domain_enabled": true, "flatpak_index": true}\ +pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.azure_storage.AzureStorage", "OPTIONS": {"account_key": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", "account_name": "devstoreaccount1", "azure_container": "pulp-test", "connection_string": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;", "expiration_secs": 120, "location": "pulp3", "overwrite_files": true}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "content_origin": null, "domain_enabled": true, "flatpak_index": true}\ pulp_scenario_env: {}\ ' vars/main.yaml fi diff --git a/template_config.yml b/template_config.yml index 0efbad9f8..cf42f3eb3 100644 --- a/template_config.yml +++ b/template_config.yml @@ -57,11 +57,40 @@ pulp_settings_azure: content_origin: null domain_enabled: true flatpak_index: true + MEDIA_ROOT: '' + STORAGES: + default: + BACKEND: storages.backends.azure_storage.AzureStorage + OPTIONS: + account_key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== + account_name: devstoreaccount1 + azure_container: pulp-test + connection_string: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1; + expiration_secs: 120 + location: pulp3 + overwrite_files: true + staticfiles: + BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage pulp_settings_gcp: null pulp_settings_s3: domain_enabled: true flatpak_index: false token_auth_disabled: true + 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 pydocstyle: true release_email: pulp-infra@redhat.com release_user: pulpbot