Project

Profile

Help

Issue #7316

Files are not being deleted from storage when calling the method delete()

Added by lmjachky 8 months ago. Updated 18 days ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

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

Related to Pulp - Issue #7676: django-cleanup can silently delete files being used by existing artifacts in some circumstancesCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Issue #8295: Disc Usage during Repository SyncASSIGNED<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision f508d6b2 View on GitHub
Added by Lubos Mjachky 8 months ago

Delete associated files from the storage

closes #7316

History

#1 Updated by pulpbot 8 months ago

  • Status changed from NEW to POST

#2 Updated by fao89 8 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 79

#3 Updated by daviddavis 8 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 8 months ago

  • Status changed from POST to MODIFIED

#5 Updated by bmbouter 7 months ago

  • Sprint/Milestone set to 3.7.0

#6 Updated by pulpbot 7 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#7 Updated by daviddavis 6 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 6 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

#9 Updated by rchan 5 months ago

  • Sprint changed from Sprint 84 to Sprint 85

#10 Updated by rchan 5 months ago

  • Sprint changed from Sprint 85 to Sprint 86

#11 Updated by rchan 4 months ago

  • Sprint changed from Sprint 86 to Sprint 87

#12 Updated by rchan 4 months ago

  • Sprint changed from Sprint 87 to Sprint 88

#13 Updated by rchan 3 months ago

  • Sprint changed from Sprint 88 to Sprint 89

#14 Updated by rchan 2 months ago

  • Sprint changed from Sprint 89 to Sprint 90

#15 Updated by daviddavis about 2 months ago

  • Sprint/Milestone set to 3.12.0
  • Sprint deleted (Sprint 90)

#16 Updated by dalley about 1 month ago

  • Related to Issue #8296: Pulp worker directories not cleaned up added

#17 Updated by dalley about 1 month ago

  • Related to deleted (Issue #8296: Pulp worker directories not cleaned up)

#18 Updated by dalley about 1 month ago

  • Related to Issue #8295: Disc Usage during Repository Sync added

#19 Updated by ipanova@redhat.com 18 days ago

  • Sprint/Milestone changed from 3.12.0 to 3.13.0

Please register to edit this issue

Also available in: Atom PDF