Page MenuHomePhabricator

Upgrade the version of Rust in the abstractwiki-rust-web base images to something more modern
Closed, ResolvedPublic

Description

We're currently on Rust 1.85, using rustc-web from bookworm. We're using rustc-web rather than rustc because rustc from bookworm is stuck all the way back on 1.63.

However, we could jump to 1.94 (and so solve some security warnings) if we use rustc from forky, by switching and either back-porting the package or by upgrading the base image.

Event Timeline

I chatted with @MoritzMuehlenhoff about this today (thanks Moritz).

Backporting the forky rustc to bookworm would be a pain, and we also don't need to do it. Instead, we can:

  • Upgrade abstractwiki-rust-web to be based on trixie instead of bookworm. (Not forky; we don't run Debian testing in prod.)
  • Install rustc from trixie-backports, which also gets us to 1.94.
    • To do that, write a patch that's basically the opposite of https://gerrit.wikimedia.org/r/1131631 -- i.e. create the .list and .pref files and insert the matching ADD lines in the dockerfile.
    • In addition to saying trixie-backports instead of bullseye-backports throughout, you should also say https://deb.debian.org/debian instead of https://mirrors.wikimedia.org/debian, which will be going away soon.

This should be a lot less work than T425341 would be.

Per discussion in T380807 I'm leaving it for the Abstract Wikipedia team to manage that upgrade, but happy to do the parts that require root and +2 in production-images, and let me know if you have any questions (or Moritz has offered to answer them on-task, too).

Change #1289012 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/docker-images/production-images@master] Provide abstractwiki-rust, using Trixie-backports

https://gerrit.wikimedia.org/r/1289012

I chatted with @MoritzMuehlenhoff about this today (thanks Moritz).

Backporting the forky rustc to bookworm would be a pain, and we also don't need to do it. Instead, we can:

  • Upgrade abstractwiki-rust-web to be based on trixie instead of bookworm. (Not forky; we don't run Debian testing in prod.)
  • Install rustc from trixie-backports, which also gets us to 1.94.
    • To do that, write a patch that's basically the opposite of https://gerrit.wikimedia.org/r/1131631 -- i.e. create the .list and .pref files and insert the matching ADD lines in the dockerfile.
    • In addition to saying trixie-backports instead of bullseye-backports throughout, you should also say https://deb.debian.org/debian instead of https://mirrors.wikimedia.org/debian, which will be going away soon.

This should be a lot less work than T425341 would be.

Per discussion in T380807 I'm leaving it for the Abstract Wikipedia team to manage that upgrade, but happy to do the parts that require root and +2 in production-images, and let me know if you have any questions (or Moritz has offered to answer them on-task, too).

This sounds like great approach, thanks for the advice. Patch pushed.

Jdforrester-WMF changed the task status from Open to In Progress.May 20 2026, 4:08 PM
Jdforrester-WMF claimed this task.

Change #1289012 merged by Muehlenhoff:

[operations/docker-images/production-images@master] Provide abstractwiki-rust, using Trixie-backports

https://gerrit.wikimedia.org/r/1289012

Built and published:

rzl@build2001:/srv/images/production-images$ sudo build-production-images --select '*/abstractwiki-rust:*'
[...]
== Step 1: building images ==
* Built image docker-registry.discovery.wmnet/abstractwiki-rust:1.94.1
== Step 2: publishing ==
Successfully published image docker-registry.discovery.wmnet/abstractwiki-rust:1.94.1
[...]

Change #1296681 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/docker-images/production-images@master] Drop the abstractwiki-rust-web images, no longer used

https://gerrit.wikimedia.org/r/1296681

Change #1296681 merged by RLazarus:

[operations/docker-images/production-images@master] Drop the abstractwiki-rust-web images, no longer used

https://gerrit.wikimedia.org/r/1296681