Does this apply to me?
Some work has been done in pulpcore. Still, some action is required and some may be required.
Requried:
- Configure CI to exercises the new STORAGES in at least 1 scenario (e.g, S3). Some scenario should still keep the legacy. Reason: both should be supported for the period [3.70, 3.85). Must happen on the PR declaring 3.70 compatibility.
Conditionally required: edit: Only pulp_container and pulp_ansible required some. PRs are open.
2. If plugin uses settings.DEFAULT_FILE_STORAGE
or settings.STATICFILE_STORAGE
explicitly, replace legacy with new.
3. If plugin uses settings imported globally on AppConfig
({plugin}/app/__init__.py
) and uses that on signal handlers, move that to in-class.
For more context: Django `DEFAULT_FILE_STORAGE` deprecated · Issue #5404 · pulp/pulpcore · GitHub
How to do it?
For the respective cases:
1. Edit the .ci/ansible/settings.py.j2
file (dont apply anymore)
- Edit
./template_config.yml
and applyplugin-template
(example after plugin-template applied) - Replace occurrences of the legacy config:
-settings.DEFAULT_FILE_STORAGE +settings.STORAGES["default"]["BACKEND"] -settings.STATICFILES_STORAGE +settings.STORAGES["staticfiles"]["BACKEND"]
- Move the settings import from module-level to class-level (instantiation time)
-
Example commit with required changes on
app/apps.py
-
Example commit with required changes on
When should this happen?
- 1: On the PR declaring 3.70 compatibility.
- 2 and 3: Before or on the PR declaring 3.70 core compatibility.