Garbage collection never deletes orphaned files from storage
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 1/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
❌ 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.
- 主要言語
- JavaScript
- スター
- 214
- フォーク
- 327
- 平均マージ
- 17時間 5分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
learningequality/studio のほかの issue
-
Community library status changes don't update `date_updated`対応中かも @ArpitaSamanta10 が 14 日前に担当しました。 オープンcommunity-contribution-in-progress DEV: backend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
learningequality/studio#6414 · コメント 8 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Activation key can activate a different account whose email differs only in case対応中かも @Madhu-priya123 が 5 日前に担当しました。 オープンDEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
learningequality/studio#6410 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
DEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
learningequality/studio#6409 ·
メンテナーはふだん 1 日以内に返信
-
DEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
learningequality/studio#6407 ·
メンテナーはふだん 1 日以内に返信
-
Stripe webhook accepts events when no webhook secret is configured対応中かも @adibmbrk が 14 日前に担当しました。 オープンcommunity-contribution-in-progress DEV: backend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
learningequality/studio#6404 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
learningequality/studio の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
babalae/bettergi-scripts-list#3905 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
dedicatedcode/reitti#1445 ·
メンテナーはふだん 1 日以内に返信
-
New tool: Uncle Desk対応中かも @github-actions が今日担当しました。 オープンsubmission triage
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
kausalflow/tools#384 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
area: css
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信