Page MenuHomePhabricator

poetry is not working in tox-poetry-buster:0.0.2
Closed, ResolvedPublicBUG REPORT

Description

Builds using poetry are breaking with the new version of the tox-poetry-buster Docker image, e.g. https://gerrit.wikimedia.org/r/c/cloud/toolforge/toolforge-cli/+/850506

16:06:49 py3-unit installed: 
16:06:49 py3-unit run-test-pre: PYTHONHASHSEED='1005314786'
16:06:49 py3-unit run-test-pre: commands[0] | poetry install
16:06:49 ERROR: InvocationError for command could not find executable poetry
$ docker run --rm -it --entrypoint= docker-registry.wikimedia.org/releng/tox-poetry-buster:0.0.2 bash
nobody@f7c790cfe011:/src$ poetry
bash: poetry: command not found
nobody@f7c790cfe011:/src$ ls -l /usr/bin/poetry
lrwxrwxrwx 1 root root 22 Oct 27 09:44 /usr/bin/poetry -> /opt/poetry/bin/poetry
nobody@f7c790cfe011:/src$ ls -l /opt/poetry/
total 36
-rw-r--r-- 1 root root 32801 Jan 10  2022 get-poetry.py

This patch will likely fix it: https://gerrit.wikimedia.org/r/c/integration/config/+/850515

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 850515 had a related patch set uploaded (by FNegri; author: David Caro):

[integration/config@master] tox-poetry-buster: upgrade poetry install script and upgrade to 1.2.2

https://gerrit.wikimedia.org/r/850515

The Docker images uses get-poetry.py without specifying any version:

RUN python3 /opt/poetry/get-poetry.py --no-modify-path

It thus tries to install the latest version available (1.2.2) which is no more supported by the get-poetry.py script:

Retrieving Poetry metadata

Version 1.2.2 does not support this installation method. Please specify a version prior to 1.2.0a1 explicitly using the '--version' option.
Please see https://python-poetry.org/blog/announcing-poetry-1-2-0a1.html#deprecation-of-the-get-poetry-py-script for more information.

And the script unhelpfully exit 0 which lets the image being build regardless of the failure :-\

Change 850515 merged by jenkins-bot:

[integration/config@master] tox-poetry-buster: upgrade poetry install script and upgrade to 1.2.2

https://gerrit.wikimedia.org/r/850515

Change 852153 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update tox-poetry-docker

https://gerrit.wikimedia.org/r/852153

hashar assigned this task to dcaro.

https://gerrit.wikimedia.org/r/c/cloud/toolforge/toolforge-cli/+/850506 works now!

Thank you to have gotten rid of the get-poetry.py script ;)

Change 852153 merged by jenkins-bot:

[integration/config@master] jjb: update tox-poetry-docker

https://gerrit.wikimedia.org/r/852153