Issue #7316
Files are not being deleted from storage when calling the method delete()
Description
According to the docs, FileField does not handle the removal of files: https://docs.djangoproject.com/en/3.1/releases/1.3/#deleting-a-model-doesn-t-delete-associated-files
PulpTemporaryFile contains such a field. When calling the method delete(), the file is not removed from the storage. We need to create our custom handlers for that.
Related issues
Associated revisions
History
#3
Updated by daviddavis 5 months ago
We should avoid cherry picking this issue to a z-stream branch and instead align it with the 3.7 release since it involves a major change in functionality for FileFields.
#4
Updated by Anonymous 5 months ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|f508d6b2ba4d624d64bcdbfa6c851afe159c6fac.
#7
Updated by daviddavis 3 months ago
- Related to Issue #7676: django-cleanup can silently delete files being used by existing artifacts in some circumstances added
#8
Updated by dalley 3 months ago
- Status changed from CLOSED - CURRENTRELEASE to NEW
- Sprint/Milestone deleted (
3.7.0) - Sprint changed from Sprint 79 to Sprint 84
This change had some unintended consequences which unfortunately our test suite didn't catch. Due to the severity of the problem, I am reverting this commit immediately to fix the releases - so we will need to find another approach to fixing this issue (or modify it such that the problem does not recur)
https://pulp.plan.io/issues/7676#note-8 https://github.com/pulp/pulpcore/pull/985
#11
Updated by rchan about 2 months ago
- Sprint changed from Sprint 86 to Sprint 87
#12
Updated by rchan about 1 month ago
- Sprint changed from Sprint 87 to Sprint 88
#13
Updated by rchan about 16 hours ago
- Sprint changed from Sprint 88 to Sprint 89
Please register to edit this issue
Delete associated files from the storage
closes #7316