Skip to content

bug: agent base image Dockerfile hard-depends on ppa:deadsnakes/ppa — intermittent unavailability blocks critical fix deployment for days #658

Closed

Description

@vybe

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 (IPv4 185.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 build attempts 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 image

Option 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 -y

Option 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

Activity

  1. added
    status-in-progress
    and removed on May 12, 2026
  2. self-assigned this
    on May 12, 2026
  3. dolho commented on May 12, 2026

    @dolho
    Contributor

    PR #810 fixes this by switching the base image to python:3.11-slim-bookworm (Option A from the issue). Verified locally: clean docker build succeeds, all language runtimes and agent CLIs work in the resulting image.

  4. vybe commented on May 12, 2026

    @vybe
    ContributorAuthor

    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.

  5. added
    complexity-low
    theme-infrastructure
    on Jun 3, 2026
  6. removed
    status-in-progress
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p2theme-infrastructuretype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions