Repository navigation
Description
Summary
The agent base image Dockerfile installs Python 3.11 via ppa:deadsnakes/ppa, an external Launchpad PPA that is intermittently unreachable. When the PPA is down, docker build fails at the apt-get install python3.11 step, making it impossible to rebuild the base image. This blocked deployment of the _kill_orphan_pipe_writers 10-second timeout fix (merged in #649, commit 64e19aa) for 3+ days on an affected instance, leaving all agent containers running the unfixed code during that window.
Component
Agent Base Image — docker/base-image/Dockerfile
Priority
P2 — builds are intermittently blocked; workaround is to retry when PPA recovers, but critical fixes can be stranded for days
Evidence (from docker build output)
639.0 E: Failed to fetch https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/pool/main/p/python3.11/python3.11_3.11.15-1+jammy1_amd64.deb
Unable to connect to ppa.launchpadcontent.net:https:
639.0 E: Failed to fetch https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/pool/main/p/python3.11/libpython3.11_3.11.15-1+jammy1_amd64.deb
Unable to connect to ppa.launchpadcontent.net:https:
639.0 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
------
Dockerfile:30
>>> RUN add-apt-repository -y ppa:deadsnakes/ppa && \
>>> apt-get update && \
>>> apt-get install -y python3.11 python3.11-venv python3.11-dev python3-pip && \
>>> update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
ERROR: failed to build: process "/bin/sh -c add-apt-repository -y ppa:deadsnakes/ppa && ..." did not complete successfully: exit code: 100
- Connectivity check to
ppa.launchpadcontent.net:443(IPv4185.125.190.80) times out - IPv6 returns "Network is unreachable"
- Other internet endpoints (GitHub API, etc.) respond normally — PPA-specific issue
- Build consistently fails after ~640 seconds (the apt download timeout)
- Issue persisted for 3+ days with multiple retry attempts
Location
- File:
docker/base-image/Dockerfile - Line: ~30 (
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt-get install -y python3.11 ...)
Root Cause
The Dockerfile has a hard runtime dependency on an external Launchpad PPA (ppa:deadsnakes/ppa) for Python 3.11 installation. Launchpad PPAs are community-hosted and have no SLA — ppa.launchpadcontent.net can be unreachable for extended periods. Ubuntu 22.04 (jammy) ships Python 3.10 by default; there is no fallback if the PPA is unavailable.
Impact
Any time the PPA is unreachable:
- Agent base image cannot be rebuilt
- All
docker buildattempts fail after a 10+ minute timeout - Critical fixes to
agent_server/code cannot be deployed to agent containers - Existing agent containers continue running the unfixed code indefinitely
In this specific case, the _kill_orphan_pipe_writers timeout fix (#649, 64e19aa) was deployed to platform containers but could not reach agent containers for 3+ days.
Suggested Fix
Several options, in order of preference:
Option A — Use the official Python Docker image as base (preferred)
# Replace Ubuntu base + deadsnakes PPA with official Python image:
FROM python:3.11-slim-bookworm
# or
FROM python:3.11-slim-jammy
# No PPA needed — Python 3.11 is built into the imageOption B — Pre-download and COPY Python debs into build context
# Download debs to a local cache directory and COPY them in:
COPY python3.11-debs/ /tmp/debs/
RUN dpkg -i /tmp/debs/*.deb || apt-get install -f -yOption C — Add --fix-missing and a retry loop
RUN for i in 1 2 3; do \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y --fix-missing python3.11 python3.11-venv python3.11-dev python3-pip && \
break; \
done(Mitigates transient failures but doesn't solve extended outages)
Option D — Use deadsnakes GitHub releases or a mirror
Some teams mirror the deadsnakes debs to an internal registry or S3 bucket to eliminate the external dependency entirely.
Environment
- Dockerfile base:
ubuntu:22.04(jammy) - Python version required: 3.11
- PPA:
ppa:deadsnakes/ppa→ppa.launchpadcontent.net - Build environment: Docker on Ubuntu 22.04 VM
Related
docker/base-image/Dockerfile— the affected build filedocker/base-image/agent_server/utils/subprocess_pgroup.py— the critical fix that couldn't be deployed due to this issue- PR bug: drain_reader_threads post-kill timeout not enforced; leaked thread blocks capacity slot indefinitely #649 / commit
64e19aa—_kill_orphan_pipe_writers10s timeout fix, blocked from reaching agent containers
Activity
dolho commentedon May 12, 2026
PR #810 fixes this by switching the base image to
python:3.11-slim-bookworm(Option A from the issue). Verified locally: cleandocker buildsucceeds, all language runtimes and agent CLIs work in the resulting image.fix(base-image): drop ppa:deadsnakes dependency by switching to pytho…
vybe commentedon May 12, 2026
Fixed by #810 (merged to dev). Switched base image from ubuntu:22.04 + ppa:deadsnakes to python:3.11-slim-bookworm, eliminating the PPA dependency entirely.