Optional apps, from design to a real install
On Sunday night we merged the design for optional Frappe apps: HR, CRM, Helpdesk and others that a site can add on top of ERPNext. The idea is “carried, not installed”. The server image carries an allowlist of apps, each pinned to a release tag and commit, but a site only gets one when our sidecar, the small agent on each server, runs an install job: snapshot, maintenance mode, install, migrate, checks, and rollback if anything fails. One rule protects every later update: no new image may reach a site unless it carries every app that site has installed.
An amendment the same night moved the post-install checks inside the server process. Frappe 16 answers every web request with a 503 while maintenance mode is on, so checks over HTTP could never pass before maintenance ended.
By early Monday the code had merged across the image, the control plane, the portal and the sidecar. The image carried HRMS, CRM, Telephony and Helpdesk; customers could ask for an app in the portal; staff approved requests. We released it to erp.infinary.io, our own site.
The full disk
The first “Update now” failed inside docker pull, and rolled back cleanly. The server’s container disk, a separate 49 GB volume, was 98% full: 36 cached images, one from every update since August. Nothing in the sidecar had ever removed an old image. Clearing the unused ones by hand freed 38 GB.
Sidecar 0.12.1, the same morning, added two guards:
- After a successful update, it prunes old images, one reference at a time. It never forces a removal or removes by image ID. It keeps the running image, the previous one (the rollback target), and any image a container still uses.
- Before any pull, it checks for room where pulls actually land: 6 GB free by default.
Pruning can’t fail an update: if it can’t list or remove something, it records that and moves on.
The first install
Then the real thing. We asked for Frappe HR in the portal’s Apps tab, approved the request as staff, and the sidecar ran the install: maintenance on, install, migrate, maintenance off. The request was done in about two minutes. HRMS 16.51.0 came up with its 10 modules and 9 workspaces, and no new rows in the Error Log.
One wording lesson: a customer’s request waits for our approval, and the portal said “added”. That read as installed. It should say it’s waiting for Infinary to approve.
Also on October 19
- Our marketing copy went under test. We fixed every claim on an audited list and added a CI gate that fails the build if they return. The note.
- The golden nightly shipped: a job that builds a candidate server image whenever anything upstream changes, and opens a PR. Its first real runs found three bugs. The note.
- Unattended agent runs got gated output (Infinary Controls 0.18.0 with Kremio Connect 0.8.0). When an agent runs on a schedule, with no person asking, what it writes opens only to people who are cleared for everything the run read.
- Cloud Build CI reached four more repositories. In Kremio Connect it exposed tests that hadn’t run on a CI-like bench since GitHub Actions stopped: the first run of
mainhad 18 failures and an error. By that morning the suite ran clean: 378 tests. - One of those failures was a real production bug. Kremio Connect’s read-only query tool runs in a sandbox with a memory cap. pandas 3 stores strings in pyarrow, and pyarrow’s default allocator reserves a 1 GiB arena on its first allocation. That reservation filled the cap. On a copy of our production image, the query tool failed 8 times out of 8 when the result had a string column. The fix sets
ARROW_DEFAULT_MEMORY_POOL=systemin the sandbox’s environment. It has to be there before pyarrow is imported; setting it afterwards does nothing, which we checked. - The first client-specific app went onto our own site, with a lockdown: on a site whose app declares it, changes to customizations arrive only through pull requests, and the admin roles that could change them belong to Infinary staff.
- Hosted agent runs began failing at start-up, about one in three. The fix took until the next afternoon: the egress wait and the wrong clock.
- Three timing tests flaked on the loaded CI machine over two days: three flaky tests, one rule.