Migrate kolibri-server into the Python monorepo
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Migrate kolibri-server from its standalone repo into platforms/ as a uv workspace member. It builds a .deb published to Launchpad PPAs and a GitHub Pages APT repo — not a wheel — so it follows the new platforms/ pattern, not the python_packages/ one used for plugins.
First publishing platform member under #13720, after the Pi image (#14967) established the platforms/ co-location pattern. Follows the completed plugin migrations (#14663 setup, #14666 sentry, #14948 oidc-client, #14949 oidc-provider, #14950 opensearch). Its publish pipeline is the most involved in the tree, so it sets the pattern for members that publish.
Complexity: High (publish CI) · Target branch: develop
Context
kolibri-server runs Kolibri behind nginx + uwsgi for higher-concurrency serving. Standalone repo contains:
- config:
kolibri_server_setup.py,nginx.conf,uwsgi.ini,hashi_uwsgi.ini; debian/packaging;pyproject.tomlatversion = "0.0.0";- runtime deps
launchpadlib+keyring; - test deps
pytest+vcrpy; scripts/launchpad_copy.py,Makefile,tests/.
The release pipeline (release.yml) is a 9-job DAG, triggered on release: published (tag v<version>) or workflow_dispatch:
check_versiongates the whole run on the git tag matchingdebian/changelog(dpkg-parsechangelog).- Launchpad path: build a signed source package →
dputtoppa:learningequality/kolibri-proposed→ wait for binaries → copy to all supported Ubuntu series → manual approval (environment: release) → promotekolibri-proposed→ stablekolibriPPA. scripts/launchpad_copy.pydrives that path via launchpadlib (check-source, wait-for-published, copy-to-series, promote).- GitHub Pages path: build a binary
.deb→ assemble arepreproAPT repo → deploy to GitHub Pages (environment: github-pages). - Secrets/vars:
LP_CREDENTIALS(Launchpad OAuth),GPG_SIGNING_KEY+GPG_PASSPHRASE(source signing),DEBIAN_REPO_SIGNING_KEY+vars.DEBIAN_REPO_SIGNING_KEY_ID(Pages repo signing). launchpad.credentialsis a private (owner-only) file, never committed.
kolibri-server currently versions independently (0.5.x). It is slated for eventual removal — deployment role being reworked, cf. kolibri-installer-debian#141. The migration is interim: prove the platforms/ pattern without over-investing, but the publish integration still has to keep working.
The Change
- Move the repo into
platforms/debian-server/. - Register it as a uv workspace member (shared lockfile), per #14663 — it builds a
.deb, never a wheel. - Add
kolibri = { workspace = true }—kolibri_server_setup.pyimportskolibri.utils/kolibri.core, so it resolves kolibri from the workspace. - Preserve git history via
git filter-repo --to-subdirectory-filter+merge --allow-unrelated-histories. - Bind the
.debversion to the Kolibri version (it importskolibridirectly, so it's already coupled), generating the changelog from the Kolibri version as debian does. - The version moves from
0.5.xto Kolibri's0.19.x— monotonic, so apt upgrades cleanly. - Reconcile the
check_versiontag↔changelog gate with that binding. - Make the release pipeline manual (
workflow_dispatchonly) for now — drop therelease: publishedauto-trigger. - Bring
scripts/launchpad_copy.pyacross, keeping the multi-series copy + proposed→stable promotion working. - Carve out the GitHub Pages APT repo: remove the
build_binary_package+publish_github_pages_ppajobs from server's pipeline. - Build server's
.debinpr_build_kolibri.yml, a sibling to the kolibridebjob, against the PR's own Kolibri. - Install that built server
.debinto the Pi image (INSTALL dist/*server*.deb), replacing theapt-get install kolibri-serverfrom the released APT source. - Trim
installtest.ymlto its nginx/uwsgi serving assertion. - Run the trimmed server smoke test in
pr_build_kolibri.yml's smoke-test block against the built.deb. - Collapse duplicated PR scaffolding (
pre-commit, pull-request-target) into the monorepo's copies. - Prefix-name migrated workflow files (
platform-debian-server-*.yml). - Add server's
pytest tests/as a row in a new Stage-2 platform Python tests matrix job intox.yml(shared acrossplatforms/members), carrying itspython-versionanddistro-infosystem dep.
Out of Scope
- Migrating other installers — separate per-repo tasks under #13720.
- Archiving the source repo.
- Behavioural changes to the Launchpad path — like-for-like migration (dependency bumps allowed where migration requires).
- Reworking the supported-Ubuntu-series list.
- Migrating server's GitHub Pages APT repo — deferred to the APT-domain issue, which uses server's
.debas its low-risk pilot. - Deduping the shared Launchpad/changelog tooling — the debian migration consolidates server's and debian's copies.
- Admin/infra setup (secrets,
releaseenvironment, keeping the old Pages URL alive) — tracked as admin tasks on #13720. - Making the build/validation CI blocking — the WHL smoke-test fan-in remains the sole blocking gate.
Acceptance Criteria
Code migration
- [ ] Repo content at
platforms/debian-server/. - [ ] server config (
nginx.conf,uwsgi.ini,debian/,scripts/) kept. - [ ]
pyproject.tomllinked to the workspace (kolibri = { workspace = true }). - [ ]
.debversion bound to the Kolibri version via a generated changelog, replacing the independent0.5.xscheme. - [ ]
launchpad.credentialsgitignored and absent from the migrated tree's history. - [ ] Passes monorepo pre-commit without per-file ignores.
- [ ] History +
git blamepreserved viagit filter-repo.
Workspace integration
- [ ] uv workspace member; included by
uv sync --group dev --all-packages. - [ ] Import name added to
known-first-partyin rootpyproject.toml's ruff isort config.
Publish / release pipeline
- [ ] The Launchpad path of
release.ymlruns from the monorepo, triggered manually (workflow_dispatch). - [ ] The Pages jobs are excluded (→ APT-domain issue).
Build / validation CI
- [ ] server's
.debbuilds inpr_build_kolibri.ymlagainst the PR's Kolibri. - [ ] The Pi image installs the built server
.deb, not the released one. - [ ] The trimmed
installtest.ymlnginx/uwsgi smoke test runs inpr_build_kolibri.yml's smoke-test block. - [ ] server's
pytest tests/runs as a row in the Stage-2 platform Python tests matrix job, instage2_required_checks'sneeds:. - [ ] Duplicated PR scaffolding collapsed into existing monorepo workflows.
Runtime
- [ ] The
.debbuilt fromplatforms/debian-server/installs and serves Kolibri behind nginx/uwsgi as before.
References
- Source repository: https://github.com/learningequality/kolibri-server
- uv workspaces: https://docs.astral.sh/uv/concepts/projects/workspaces/
AI usage
Used Claude Code to draft this issue from the migration-framework design; I drove scope and decisions. Claude read the source repo's release.yml and Makefile to ground the publish-CI details and checked them against the monorepo's conventions.
Plan: Migrate the standalone kolibri-server repo into the Kolibri monorepo at platforms/debian-server/ as a uv workspace member, binding its .deb version to Kolibri, integrating its Launchpad publish pipeline and PR build/smoke-test into the monorepo's CI, while preserving git history.
- [ ] Import kolibri-server subtree with preserved history, scrub credentials
- [ ] Wire debian-server as a uv workspace member
- [ ] Bind the
.debversion to Kolibri via a generated changelog - [ ] Prune migrated tree — collapse duplicated PR scaffolding, pass monorepo pre-commit
- [ ] Migrate the Launchpad release workflow into the monorepo
- [ ] Build server's
.debinpr_build_kolibri.ymlagainst the PR's Kolibri - [ ] Install the built server
.debinto the Pi image - [ ] Add a server serving smoke test to the PR build (replacing
installtest.yml) - [ ] Add server
pytest tests/as a Stage-2 platform test matrix row
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
Fixed in #14998