Remove slideshow support

未關閉
#6,353 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
django, postgresql, python
領域
backend, databases

研究方向

Start with the SlideshowSlide and File.slideshow_slide models in contentcuration/contentcuration/models.py, then trace the ricecooker endpoint in views/internal.py and publish logic in utils/publish.py. Review the migration and garbage collection paths as well. Done means existing slideshow rows and support are removed, the endpoint returns 400 for slideshow nodes, publish stops building manifests, and the migration fails on lock timeout.

由索引模型根據 Issue 內容生成。

描述

DEV: backend

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Slideshow content can no longer be created: the Studio editor never supported it, and ricecooker removed SlideshowNode, so only Studio's ricecooker endpoint still accepts slides, and no current ricecooker sends them. Production holds 81 slideshow nodes, all in test or QA channels, with 85 SlideshowSlide rows created between 2019 and 2021. File.slideshow_slide's index costs 6.6 GB to cover those 85 rows. Slideshow support and the existing slideshow nodes should be removed from Studio.

Complexity: Medium
Target branch: hotfixes

Context
The Change
  • The existing slideshow nodes should be deleted, along with their slides and slide Files.
  • SlideshowSlide and File.slideshow_slide should be removed. The column drop takes a brief ACCESS EXCLUSIVE lock on contentcuration_file, so the migration should set a lock_timeout and fail rather than retry.
  • The ricecooker endpoint should reject a slideshow node with a 400 rather than create it.
  • Publish should no longer build slideshow manifests.
Out of Scope
  • The slideshow kind in le-utils, and Kolibri's slideshow_viewer.
Acceptance Criteria
General
  • After deploy to hotfixes, no contentnode row has kind_id = 'slideshow'
  • contentcuration_slideshowslide no longer exists, and contentcuration_file has no slideshow_slide_id column or index
  • The migration aborts with a non-zero exit when it can't acquire its lock within lock_timeout
  • Uploading a slideshow node through the ricecooker endpoint returns a 400
  • makemigrations --check reports no changes
Testing
  • A test covers the ricecooker endpoint rejecting a slideshow node

AI usage

Drafted with Claude Code, which measured slideshow usage on production through read-only queries in the disposable debugging job and traced the slideshow code paths. I chose to remove the feature and delete the existing nodes.

主要語言
Python
星號
212
分支
314
平均合併
3 天 13 小時
30 天內合併 PR
28

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

learningequality/studio 的其他 Issue

查看 learningequality/studio 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。