Back to Field Notes

Keeping our golden image on the newest Frappe and ERPNext

Twice in six days we moved every site's base image to the newest ERPNext and Frappe v16, and upstream re-pushed a tag under us in between. How we pin, check and test an upgrade, what that caught, and the nightly job we wrote so it stops depending on someone remembering.

Covers
Written
Repositories
infinary.io
Status
Shipped
Reading time
5 min
#golden-image#frappe#erpnext#testing
Contents
October 2026, Denver dates
  1. v16 moves from ERPNext 16.32.3 to 16.50.0.
  2. Upstream re-pushes frappe/erpnext:v16.50.0 with a different digest.
  3. v16 moves to ERPNext 16.51.1 with Frappe 16.52.0; that evening a release on it reaches our own site.
  4. A standing rule, and a nightly job that proposes new versions.

What the golden image is

Every Infinary site runs a prebuilt image, our (The server image every Infinary site runs: Frappe, ERPNext and our own apps, pinned to exact versions and tested together.): upstream’s frappe/erpnext base with our agent app and Kremio Connect added, and then a thin layer with Infinary Controls. An update swaps a site onto a newer image and migrates it. So the ERPNext and Frappe versions in the image are the versions every site runs.

October 11: 16.32.3 to 16.50.0

The first move of the week took the v16 base from ERPNext 16.32.3 to 16.50.0, and v15 from 15.115.0 to 15.122.0.

  • The jump is smaller than it looks. 16.37 to 16.50 is an upstream renumbering: v16.49.0 is the same commit as v16.37.0.
  • Pin by digest, read versions from the image. Both bases are pinned by digest, and the Frappe and ERPNext versions were read out of the image layers, not inferred from tag dates.
  • A stale pin would have downgraded sites. The layer always carries the Infinary Controls version named in versions.json, which still said 0.2.0. Building it would have downgraded Controls on any site that had moved past that.
  • Frappe Assistant Core stayed at 2.5.1, because 3.0.0 removes two tools our catalog agents still used.

The rehearsal built the whole stack on 16.32.3, seeded a company and a submitted Sales Invoice, moved the same sites volume onto the 16.50.0 build and migrated. The migration exited 0, the old invoice survived, and a new one posted to the ledger.

October 14: a tag moved under us

October 16: ERPNext 16.51.1 and Frappe 16.52.0

Five days after the first move we made the second: v16 to ERPNext 16.51.1 with Frappe 16.52.0, and v15 to ERPNext 15.123.0 with Frappe 15.123.1. The image’s config doesn’t record the Frappe version, so we read __version__ from each image. This is how we checked it:

  • Release notes, then our own code. We read every Frappe and ERPNext release note between the pin and the target, and searched our four Frappe apps for each API they touched. Nothing broke, but behaviour changed: a Query Builder query that asks for child-table fields with distinct or group_by must now select name; a comment’s author now comes from the signed-in user; Chrome PDFs honour the print format’s margins; and several ERPNext mappings and reports changed, including stock balances that now respect user permissions.
  • The same tests on both bases. We built the images locally from the branch, created a fresh site with all our apps, migrated, and ran Kremio Connect’s suite on the new base and on a baseline built the same way on 16.50.0. Both ran 281 tests. The target passed 267 with 1 failure and 11 errors; the baseline passed 268 with 1 failure and 10 errors. The 11 shared failures and errors had nothing to do with the upgrade: a fresh site has no encryption key until something encrypts, one test needs HRMS, and one gets a 401 where it expects a 403, on both bases. The one extra error was a sandbox memory-limit flake that passed twice alone on each base and in a second full run.
  • Smoke tests. The desk rendered, the setup wizard ran, a Sales Invoice submitted, and the desk’s PDF route made a one-page, 72 KB Chrome PDF in 0.4 s with the Chrome baked into the image. v15 installed and migrated.
  • Chrome stayed at 133.0.6943.35, because Frappe 16.52.0 still downloads that version and our rule is to follow Frappe.
tests, run on both bases
281
extra error on the new base, a flake
1
for a one-page Chrome PDF
0.4 s
golden build on Cloud Build
3 min 21 s
our site down during the update
about 2.5 min

That evening a release on the new base reached our own site, now on Frappe 16.52.0 and ERPNext 16.51.1. On Cloud Build the golden image took 3 min 21 s to build and the layer 55 s. The site was down for about two and a half minutes during the update, with 502s and 503s from 01:32 to 01:34:35 UTC.

Making it routine

On Sunday night, October 18, Nikolas made it a standing rule: every golden rebuild takes the newest Frappe, ERPNext and HRMS releases for the major, checked at build time rather than when the release was planned. Frappe ships roughly weekly, so a plan written a few days earlier is already stale.

Replayed against our repository as it stood before the October 16 upgrade, it proposed exactly the versions we had shipped by hand. It merged just after midnight; how its first real runs went belongs to a later note.

What we’d tell someone else