Skip to content

[Bug][docker] Poetry installation fails without cache due to Python 3.9 incompatibility #8734

@rodrigoluizs

Description

@rodrigoluizs

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

The backend/Dockerfile installs Poetry without pinning a version:

RUN curl -sSL https://install.python-poetry.org | python3 -

Poetry 2.3.0 dropped support for Python 3.9. Since the base image uses python:3.9-slim-bookworm, the unpinned installer now fetches an incompatible version (currently 2.3.2), causing the build to fail when there is no Docker layer cache available.

Reference: https://python-poetry.org/blog/announcing-poetry-2.3.0/

Build error:

Installing Poetry (2.3.2): An error occurred. Removing partial environment.
Poetry installation failed.

What do you expect to happen

The Docker build should succeed regardless of cache state.

How to reproduce

Build the base target from backend/Dockerfile without Docker layer cache:

docker build --no-cache --target base ./backend

The build fails at the Poetry installation step. Current builds on CI only succeed because the cached devlake:base image still contains a Poetry layer from a previous compatible version.

Anything else

Suggested fix — pin Poetry to 2.2.1, the last release compatible with Python 3.9:

RUN curl -sSL https://install.python-poetry.org | python3 - --version 2.2.1

Alternatively, upgrade the base image to Python 3.10+ to support Poetry 2.3+, but that has a larger blast radius.

Version

latest main

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/highThis issue is very importantseverity/p0This bug blocks key user journey and functiontype/bugThis issue is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions