Repository navigation
feat!: update Course Discovery image to Ubuntu 24.04 - #132
Conversation
Faraz32123
left a comment
There was a problem hiding this comment.
Thanks! Retargeting main matches what we did for tutor#1508. Claude built this branch merged with the current main (which now has Node 24 / pip 26 / certifi from #133) on ubuntu:24.04: the build succeeds, the image runs as app (1000) with Python 3.12.2 and Node 24.22.1, static assets are collected and manage.py check reports no errors. None of the ntp/systemd or Makefile issues from tutor#1508 apply here.
A few small things carried over from the tutor#1508 review:
-
Changelog: please drop the
userdelsub-bullet (it's an implementation detail, and theubuntuuser isn't something the image "now ships":ubuntu:22.04never had it). Since it's 💥, tell users what to do instead. Something like:- 💥[Feature] Update the Course Discovery image to use Ubuntu 24.04 as base OS. You will need to rebuild the discovery image with `tutor images build discovery`. If you maintain a custom Dockerfile or patches that `apt install` packages in this image, you may need to switch to the Ubuntu 24.04 package names: many libraries got a `t64` suffix, and some versions changed (e.g. `libicu70` → `libicu74`). (by @Syed-Ali-Abbas-568)
-
Commit title:
fix:→feat!:, since this is a breaking change. -
PR description: the UID clash isn't "a latent bug … masked by registry build caching": a clean 22.04 build never had a
ubuntuuser, so theuserdelis needed precisely because of the 24.04 bump.
Faraz32123
left a comment
There was a problem hiding this comment.
Approving: the build and runtime checks above pass, and the remaining points in my previous comment (changelog wording, feat!: commit title, PR description) are non-blocking.
The discovery image was still pinned to Ubuntu 22.04. Bumping the base image alone is not enough: Ubuntu's official Docker image now ships a built-in non-root `ubuntu` user at UID 1000, which collides with the useradd call that creates Tutor's own `app` user and breaks any clean build from scratch. Delete that default user first, matching the fix already shipped in tutor-notes, tutor-xqueue and tutor-credentials. Verified locally: `tutor images build discovery` succeeds end-to-end on ubuntu:24.04. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
434d7fc to
af3d5f5
Compare
Summary
Bumps the discovery image's base OS from Ubuntu 22.04 to 24.04, matching every other Tutor plugin image (
tutor-notes,tutor-android,tutor-credentials,tutor-xqueue), all already on 24.04. 24.04 is also the version validated by Open edX's own upstream CI — nothing newer has been exercised by the community yet.There's a currently open dependabot PR (#131) targeting 25.10, which is an interim non-LTS release (9 months of support) rather than the 24.04/26.04 LTS line, and an earlier closed one (#120) that targeted 26.04 and broke on a clean build (same root cause as here). Recommend closing #131 in favor of this PR.
Why not just the version bump
A clean rebuild on
ubuntu:24.04fails onuseradd --uid 1000 appwithUID 1000 is not unique. Ubuntu's official Docker image now ships a built-in non-rootubuntuuser at UID 1000, which collides with theappuser Tutor creates. This clash is introduced by the 24.04 bump itself:ubuntu:22.04never shipped aubuntuuser, so there's no pre-existing bug being unmasked here, just a new one that comes with the base image change.tutor-notes,tutor-xqueueandtutor-credentialsalready carry the fix (RUN userdel -r ubuntu); this PR applies the same one-line fix here.Testing done
Verified locally:
tutor images build discoveryonubuntu:24.04with this fix succeeds end-to-end. Confirmed the failure reproduces identically without theuserdelline and does not reproduce with it.Notes
A companion PR for Tutor core (overhangio/tutor#1508) applies the identical fix to the openedx image, which was also still on 22.04.
cc @Faraz32123