Skip to content

Backfill included_presets on public files during deploy - #6458

Open
rtibblesbot wants to merge 1 commit into
learningequality:hotfixesfrom
rtibblesbot:issue-6456-ea872e
Open

rtibblesbot wants to merge 1 commit into
learningequality:hotfixesfrom
rtibblesbot:issue-6456-ea872e

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Public files mapped before publish computed included_presets store NULL, which /importmetadata/ returns.
  • New management command, run from make deploy-migrate, batch-fills them with the value publish would write.
  • Skips supplementary, already-set and unknown-preset rows.

References

Fixes #6456. Precedent: #6171.

Reviewer guidance

Suggested review: Full code review.

Engineer review

  • Post-scan remaps of versions published before fe88cd4cc can reintroduce NULL masks (contentcuration/kolibri_public/utils/mapper.py:91).
  • If-Modified-Since requests can return 304 for stale NULL masks until the public metadata timestamp advances (contentcuration/kolibri_public/views.py:63).
  • Confirm 10,000-row batches fit production's lock and write-ahead log budget (contentcuration/kolibri_public/management/commands/backfill_public_file_included_presets.py:15).
Engineer evidence

Not run against Postgres outside CI's backend tests.

  • Does the default 10,000-row batch fit production's lock and WAL budget for kolibri_public_file?
  • Clients revalidating /importmetadata/ get 304 on stale NULLs until a public channel is next mapped, as after the modality backfill.

AI usage

Used Claude Code to write the command, its tests and the deploy-migrate entry following the modality backfill. Verified with code review against the publish rule and make -n deploy-migrate.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot

🟡 Waiting for feedback

WAITING · on a reviewer
Last updated: 2026-11-19 23:21 UTC

Adds backfill_public_file_included_presets, run from deploy-migrate, to set
included_presets on non-supplementary renderable kolibri_public files in batches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rtibblesbot
rtibblesbot marked this pull request as ready for review November 19, 2026 23:19
@rtibblesbot
rtibblesbot requested review from a team and leq-bot November 19, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant