Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Export sync data to an archive file with a disk connection

オープン
#388 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
10/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
django, postgresql, python, sqlite

調査の方向性

Read the linked design spec and implementation plan, then review the dependent sub-issues from #362 through #387. Start with morango/sync/ and MorangoProfileController.create_disk_connection(path), along with morango/models/core.py and morango/constants/settings.py. Done means all sub-issues are closed and the characterization, contract, parity, and full SQLite/PostgreSQL suites pass.

索引モデルが issue の本文から書いたものです。

説明

DEV: backend TAG: new feature

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

Overview

This tracking issue groups the work for Phase 1 of disk sync. Phase 1 adds a disk connection that exports a fresh SQLite archive through the existing sync stages.

Background & Motivation

Morango syncs only over the network today. MorangoProfileController.create_disk_connection is a stub. Large Kolibri instances hold many facilities, and some facilities are not active all the time. Infrastructure managers need to export the data of a facility to an archive file and store it offline.

The design adds a shared Connection interface with a transport-neutral Peer protocol. Network and disk connections both implement it. The sync stage operations become shared Peer* operations, so that one set of client-side logic drives both connection types.

An archive holds the same morango data that a network server holds after it receives the same push. An archive also holds a manifest. This parity lets later phases reuse the existing receiver code.

Design: spec. Plan: implementation plan.

User Story

As someone who manages the infrastructure for large Kolibri instances with many facilities,
I want a way to export archives of facilities,
So that I can store the data offline until it is needed again.

This work covers the export only. Import from an archive is Phase 2. Kolibri can already remove the data of a facility from an instance, so that step is not part of this work.

Description & Expected Outcomes

The work lands in milestones. The refactor milestones (M1 to M4) come first. They change no behavior, and the characterization suite must pass without edits after each one. The feature milestones (M5 and M6) come next, and M7 adds the final verification.

Milestone Plan task Issue Blocked by
M0 Spike 1 #362 none
M1 Characterization 2 #363 none
M1 Characterization 3 #364 #363
M2 Database handle 4 #365 #362, #364
M2 Database handle 5 #366 #365
M2 Database handle 6 #367 #366
M2 Database handle 7 #368 #365
M3 Connection seam 8 #369 #364
M3 Connection seam 9 #370 #369
M3 Connection seam 10 #371 #369, #370
M3 Connection seam 11 #372 #371
M4 Shared operations 12 #373 #370
M4 Shared operations 13 #374 #368, #371, #373
M4 Shared operations 14 #375 #374
M5 Archive 15 #376 #375
M5 Archive 16 #377 #376
M5 Archive 17 #378 #362, #365, #377
M5 Archive 18 #379 #378
M5 Archive 19 #380 #378
M5 Archive 20 #381 #378
M5 Archive 21 #382 #377, #378, #379
M6 Disk connection 22 #383 #370, #373, #380, #381, #382
M6 Disk connection 23 #384 #367, #371, #383
M7 Verification 24 #385 #372, #384
M7 Verification 25 #386 #375, #384
M7 Verification 26 #387 #386

Deliverables & Contracts

When all sub-issues close, morango delivers these capabilities:

  • MorangoProfileController.create_disk_connection(path) returns a DiskSyncConnection.
  • A push through a disk connection writes a complete archive at the path.
  • NetworkSyncConnection and DiskSyncConnection implement one Connection interface.
  • The Peer* operations contain the client-side stage logic for both connection types.
  • The old Network* operation names, server_info, and server_cert= keep their behavior and emit a DeprecationWarning.
Acceptance Criteria
  • All sub-issues are closed.
  • The characterization suite passes without edits after each refactor milestone.
  • The contract suite passes for the network and the disk connection.
  • The parity test passes: the archive data equals the data of a network server for the same push.
  • The full test suite passes on SQLite and PostgreSQL.

Technical Pointers & Architecture

  • Target Components / Context: morango/sync/ (connections, contexts, operations, database handle, archive), morango/models/core.py, morango/constants/settings.py.
  • Related Patterns: The middleware dispatches operations by context type (morango/registry.py). The design reuses this dispatch for connection-specific overrides.
  • Data Model & Schema Considerations: One new model, ArchiveManifestEntry, with migration 0006. The migration only adds a table.
  • Resilience & Failure Modes: If an export fails, the connection discards the partial archive. A lock file prevents two exports to the same path.

Notes & Tradeoffs

  • Out of scope: Import from an archive (Phase 2), resume of disk sync sessions (Phase 3), and updates to an existing archive (Phase 4).
  • Kolibri companion changes: See spec §3.9. Kolibri routers must allow morango migrations on aliases that start with morango_archive_. Kolibri settings overrides must list the Peer* operations.
  • Follow-up issue: Separate commands from queries in the Peer protocol. The spec lists this item in §8.
  • Security: An archive holds facility data in plain text. An archive never holds private keys.

Metadata

  • Complexity: High
  • Target Branch: release-v0.9.x

AI Usage

Drafted with Claude (Claude Code) from the approved design spec and implementation plan. The author reviewed the requirements, and the code references were checked against the release-v0.9.x codebase.

主要言語
Python
スター
15
フォーク
23
平均マージ
1日 11時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

learningequality/morango のほかの issue

learningequality/morango の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。