Garbage collection never deletes orphaned files from storage
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 1/100
Hướng nghiên cứu
Read contentcuration/contentcuration/utils/garbage_collect.py and the named tests in contentcuration/contentcuration/tests/utils/test_garbage_collect.py; start by running the focused pytest command from the issue. The issue says contributions are not open for this task, so it is not suitable for a first contribution.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
_clean_up_files assigns a Django Exists(...) expression to is_other_node_pointing and tests if not is_other_node_pointing:. The expression is never run as a query, and an Exists object is always truthy, so default_storage.delete is never called. manage.py garbage_collect deletes the File rows of orphaned nodes and leaves their storage objects in the bucket.
User-facing consequences
Storage objects of garbage-collected content are never reclaimed, so the bucket only grows.
Steps to reproduce
- In
test_deletes_associated_files, addassert not default_storage.exists("storage/a/a/aaa.jpg")afterclean_up_contentnodes(). - Run
pytest contentcuration/contentcuration/tests/utils/test_garbage_collect.py -k test_deletes_associated_files. - The new assertion fails: the object is still stored.
Acceptance Criteria
- After
clean_up_contentnodes(), a storage object referenced only byFilerows of the cleaned-up nodes no longer exists indefault_storage. - A storage object also referenced by a
Filerow outside the cleaned-up nodes still exists. -
clean_up_contentnodes()completes when aFilerow's storage object is already absent:GoogleCloudStorage.deleteraisesAttributeErrorfor a missing object.
AI usage
Claude Code (Fable 5.2) found this while planning #6445 and wrote the issue.
- Ngôn ngữ chính
- JavaScript
- Star
- 214
- Fork
- 327
- Merge trung bình
- 17 giờ 5 phút
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của learningequality/studio
-
Community library status changes don't update `date_updated`Có thể đã có người làm @ArpitaSamanta10 đã nhận 14 ngày trước. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
learningequality/studio#6414 · 8 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Activation key can activate a different account whose email differs only in caseCó thể đã có người làm @Madhu-priya123 đã nhận 5 ngày trước. Đang mởDEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
learningequality/studio#6410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
learningequality/studio#6409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Stripe webhook accepts events when no webhook secret is configuredCó thể đã có người làm @adibmbrk đã nhận 14 ngày trước. Đang mởcommunity-contribution-in-progress DEV: backend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/studio#6404 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/studio
Issue tương tự
-
[bug] 提瓦特记事本原石检测框宽度较窄Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
babalae/bettergi-scripts-list#3905 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
dedicatedcode/reitti#1445 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New tool: Uncle DeskCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mởsubmission triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
kausalflow/tools#384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add spaced repetition schedulingĐang mởgood first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Fuzz: css syntax bug foundĐang mởarea: css
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày