Skip to content

fix(docker): pin Poetry to 2.2.1 for Python 3.9 compatibility#8735

Open
rodrigoluizs wants to merge 1 commit intoapache:mainfrom
bonial-oss:rodrigo/fix/pin-poetry-version
Open

fix(docker): pin Poetry to 2.2.1 for Python 3.9 compatibility#8735
rodrigoluizs wants to merge 1 commit intoapache:mainfrom
bonial-oss:rodrigo/fix/pin-poetry-version

Conversation

@rodrigoluizs
Copy link

@rodrigoluizs rodrigoluizs commented Feb 27, 2026

Title: fix(docker): pin Poetry to 2.2.1 for Python 3.9 compatibility

Base: main (apache/incubator-devlake)


Summary

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/

Current CI builds succeed only because the cached devlake:base image still contains a Poetry layer from a previous compatible version. Any cache invalidation (base image security update, forced rebuild, new registry) will break the build with:

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

This PR pins Poetry to 2.2.1, the last release compatible with Python 3.9.

Does this close any open issues?

Closes #8734

Screenshots

N/A

Other Information

An alternative approach would be to upgrade the base image to Python 3.10+ to support Poetry 2.3+, but that has a larger blast radius.

Poetry 2.3.0 dropped Python 3.9 support. Without cache the installer
fetches the latest version (currently 2.3.2), which fails on the
python:3.9-slim-bookworm base image. Pin to 2.2.1, the last release
compatible with Python 3.9.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. devops Something about CI/CD (devops) pr-type/bug-fix This PR fixes a bug labels Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops Something about CI/CD (devops) pr-type/bug-fix This PR fixes a bug size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant