Skip to content

Conversation

@sburman
Copy link

@sburman sburman commented Jan 6, 2025

The release of poetry 2.0 has broken the dockerfile that underpins this github action.

What was previously a warning only, has now becomes an error causing the docker build to fail.

The warning is caused by a missing readme file; which has no functional bearing on the action itself but is a byproduct of calling poetry install.

This PR:

  • fixes the poetry version to be below poetry>=1,<2.0
  • ups the package version number in pyproject.toml to 1.1.0 indicating a minor change

Suggestion: create a fixed tag for this repository at 1.1.0 such that people can pin to this working version.

Future suggestion: After fixing the issues with poetry 2.0, create a tag 2.0.0 as the basis for continued development.

@SquidDev
Copy link
Contributor

SquidDev commented Jan 6, 2025

I think it is possible to support latest Poetry with some tweaks to the Dockerfile. This requires changing the package name to diff-poetry-lock (see #6), but otherwise the following seems to work:

FROM python:3.11.2-slim

RUN pip install poetry && mkdir /src
COPY poetry.lock pyproject.toml README.md /src
COPY diff_poetry_lock /src/diff_poetry_lock
RUN python3 -m venv /src/.venv && poetry install --directory /src --without=dev

ENTRYPOINT ["poetry", "--directory", "/src", "run", "python3", "-m", "diff_poetry_lock.run_poetry"]

@sburman
Copy link
Author

sburman commented Jan 6, 2025

I think it is possible to support latest Poetry with some tweaks to the Dockerfile. This requires changing the package name to diff-poetry-lock (see #6), but otherwise the following seems to work:

It is definitely solvable. I was just thinking in terms of a two-step approach. This PR being step 1.

Suggestion: create a fixed tag for this repository at 1.1.0 such that people can pin to this working version.

Future suggestion: After fixing the issues with poetry 2.0, create a tag 2.0.0 as the basis for continued development.

@colindean
Copy link
Contributor

My usage of diff-poetry-lock is blocked on this, too.

https://github.com/target/make-python-devex/actions/runs/12674700416/job/35323995765?pr=117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants