openlibrary
openlibrary copied to clipboard
update to python:3.11.7-slim
Can we please update to 3.11.7?
Why? Version 7.83, has a --no-clobber option that I'd like to use inside the docker image. For https://github.com/internetarchive/openlibrary/pull/8395/
python:3.11.1-slim has curl 7.74.0
python:3.11.7-slim has curl 7.88.1
cc: @cdrini
Testing
I'm not quite sure how to test but since it is a minor version bump I think the CI and a small push to staging should be good.
This is potentially a little more complicated than it appears. Updating python updates the underlying OS on the docker container, so we'll be updating loads of dependencies and I think an update to debian bookworm iirc! We can give it a whirl though. @scottbarnes I know you experimented with going to 3.12, did debian bookworm cause any issues? Also just to confirm, is 3.11.7 also debian bookworm?
@cdrini, yes, this is bookworm.
Edit: I used bookworm (and Python 3.12.1, with updated web.py
code) for at least a week for local development. Granted, What I was doing may not have tested things that somehow broke during some upgrade or another, but I didn't experience any issues, for whatever that's worth.
For this PR I did:
docker build --no-cache -t openlibrary/olbase:3.11.7 -f docker/Dockerfile.olbase .
OLIMAGE="openlibrary/olbase:3.11.7" docker compose build --no-cache
OLIMAGE="openlibrary/olbase:3.11.7" docker compose up
I see:
❯ docker compose exec web bash
WARN[0000] The "HOST" variable is not set. Defaulting to a blank string.
openlibrary@706fcc07be5c:/openlibrary$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
openlibrary@706fcc07be5c:/openlibrary$
Ok following the rough instructions here to put on testing.openlibrary.org: https://github.com/internetarchive/openlibrary/pull/7232
Ugh for some reason testing kept getting stuck at the npm ci
step -_-
closing in favor of https://github.com/internetarchive/openlibrary/pull/8850