Add a `proposed` prerelease suite to the apt.learningequality.org APT repo
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Add a proposed suite to the self-hosted APT repo at apt.learningequality.org. A built .deb publishes to proposed. After a smoke test it is promoted to stable. This decouples releases from Launchpad's multi-hour publish latency.
It covers both Debian packages the repo serves: kolibri (from kolibri-installer-debian) and kolibri-server. Running it in the monorepo is what lets one shared flow serve both. It replaces the abandoned kolibri-installer-debian#165. That built the flow for kolibri alone, on the now-removed gh-pages path.
Complexity: Medium Target branch: develop
Context
The self-hosted APT repo (#14965) is a reprepro archive. Its pool and metadata live in the release GCS bucket's apt/ subfolder, served as apt.learningequality.org via a Cloudflare rewrite. Each publish is a read-modify-write against the bucket: gcloud storage rsync down, reprepro operation, rsync up. Persistence is therefore inherent to the bucket — no gh-pages branch, no git history to flatten. Both kolibri and kolibri-server hand their built .deb to a shared publish workflow that includedebs into the repo.
The repo currently serves a single stable suite. Prereleases go only to Launchpad's kolibri-proposed PPA, which currently gates the release. That PPA's publish latency has run into hours. On a recent release the build finished in ~4 min but the binary was not installable for ~138 min.
The Change
- Two suites. Add a
proposedsuite alongsidestablein the repreprodistributionsconfig. One repo serves both channels, for both packages. - Publish always targets
proposed. Every.debbuild enters viaproposed.stableis never published to directly. - Promote via a dispatchable workflow. A
workflow_dispatchworkflow copies a staged packageproposed → stablewithreprepro copy— the same.deb, no rebuild. - Promotion is the release gate. Run it after the final
proposedbuild passes its smoke test. - Retention
Limit: 3. Each suite keeps the last 3 versions per package. Older.debs are pruned from the pool. Pool objects already in the bucket are not re-uploaded on publish. - Launchpad becomes a fire-and-forget mirror. The release flow still uploads to Launchpad but no longer waits on it. apt.le.org is the authoritative channel.
Out of Scope
- The apt.le.org host, domain, and reprepro-on-GCS publish mechanism itself (#14965) — this builds on it.
- The
kolibri-server(#14964) andkolibri-installer-debian(#14966) migrations — prerequisites, not done here. - Behavioural changes to either
.deb. - Changes to how Launchpad builds or signs packages — only its gating role changes.
Acceptance Criteria
- [ ] The reprepro repo defines a
stableand aproposedsuite, both published toapt.learningequality.org. - [ ] Both the
kolibriandkolibri-server.debs are installable fromproposedviaapt. - [ ] After the promote workflow runs,
stableserves the same.debthat was staged inproposed. - [ ] The promoted
.debis installable fromstableviaapt. - [ ] A
proposedpublish leavesstableintact. - [ ] A promotion leaves the current
proposedintact. - [ ] A fourth publish to a suite drops the oldest of its 3 retained versions from the pool.
- [ ] A release completes without blocking on Launchpad.
- [ ]
apt updateagainst either suite verifies signatures with the published key (noNO_PUBKEY). - [ ] Repo-setup docs cover enabling either suite (
stable/proposed): sources entry plussigned-bykey.
References
- Abandoned gh-pages predecessor:
learningequality/kolibri-installer-debian#165 - reprepro: https://salsa.debian.org/debian/reprepro
AI usage
Drafted with Claude Code in an interactive session. I made the design decisions. Claude drafted the text and read kolibri-installer-debian#165, #14965, and the server/debian migration issues to ground it.
@rtibbles one blocker before planning: Limit: 3 isn't supported by the reprepro we can install.
- Ubuntu 24.04/26.04 and Debian ship
reprepro 5.4.6+really5.3.2. Debian reverted 5.4, so this is 5.3.2. - In 5.3.2,
Limit:inconf/distributionsis an "Unknown header" error. Each suite holds one version per package, and a newer.debreplaces the old one in the index and the pool.
Options:
- A — keep stock reprepro, drop retention (recommended).
proposedandstableeach serve their latest version. To roll back, dispatchplatform-apt-repo-publish.ymlwith an older release'sdeb-url. That AC changes to "a publish replaces the suite's previous version". - B — build upstream reprepro 5.4.x from salsa in the publish job. This supports
Limit: 3. The cost is a pinned source build of a version Debian reverted, plus a one-way migration of the live bucket'sdb/to the 5.4 format.
Which one? Unless you say otherwise, I'll also assume this for the release flow:
- Every
releaseevent (prerelease and final) publisheskolibriandkolibri-servertoproposed, beforeblock_release_step. - The promote workflow is
workflow_dispatch(input:version) plusworkflow_call.release_kolibri.ymlcalls it afterblock_release_step, so approving the release is the promotion. - Nothing waits on the Launchpad jobs anymore:
platform-debian-server-release.yml's approval no longerneeds: wait_for_copies_published. Those jobs still run to completion on their own.
A seems fine to me - we can revisit the limit in future if requested by users.
Thanks. This is what I'll build, using option A:
conf/distributions.ingets aproposedsuite next tostable, and both use the sameSignWith. There's noLimit:, so each suite serves only its latest version per package.publish.shalways runsincludedeb proposed.- New
platform-apt-repo-promote.yml(workflow_dispatch+workflow_call) runsreprepro copy stable proposed kolibri kolibri-serverin the same rsync-down/up cycle and under the sameapt-repo-publishconcurrency group. The.debisn't rebuilt. release_kolibri.yml:- Every release event, prerelease or final, publishes both
.debs toproposed, ahead ofblock_release_step. - On a final release, promotion runs after
block_release_step.
- Every release event, prerelease or final, publishes both
platform-debian-server-release.ymlno longer publishes to the APT repo, and its approval no longer needswait_for_copies_published. The Launchpad jobs stay but gate nothing.- The README documents
stableandproposedsource entries withsigned-by. - The retention AC is now "a publish replaces the suite's previous version". Tests extend
test_publish_roundtrip.sh:- publishing to
proposedleavesstableintact; - promotion leaves
proposedintact; stableserves the byte-identical.deb.
- publishing to
Plan: Every release publishes kolibri and kolibri-server to a new proposed suite on apt.learningequality.org; approving a final release copies the same .debs to stable, with Launchpad gating nothing.
- [ ] Two suites; publish targets
proposed - [ ] Promotion script
- [ ] Workflows and release wiring
- [ ] Self-review the produced code
Assumptions — the issue did not settle these; say so if one is wrong.
- Publishing an older version replaces
proposed's newer one; ifproposedmust keep the highest, a patch after a newer beta cannot be promoted. - Promotion pins
pkg=versionfrom the publish jobs; with an unpinned copy, a beta published during approval would reachstable. - Promotion skips a package when
stableholds an equal or newer version; if a downgrade is wanted,promote.shmust allow it. block_release_stepwaits for bothproposedpublishes; if not, approval can come beforeproposedholds the build to smoke-test.platform-debian-server-release.ymlkeeps its own approval, now ungated by Launchpad; if it should go, dispatching that workflow alone loses its gate.
Written by rtibblesbot, an LLM-based coding agent.
@rtibbles Blocked — these cannot be assumed either way:
- Every GitHub release, prereleases included, now carries a
kolibri-server_*.debasset (upload_server_deb,release_kolibri.yml:111); the README's recovery and rollback paths republish it from there. #14979 does not ask for it — keep it, or drop it and name another source for those paths?
Written by rtibblesbot, an LLM-based coding agent.
I think for now we should assume we publish both the base kolibri deb asset and the kolibri-server deb asset at the same time.