Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to handle Poetry 2.x #701

Open
loneil opened this issue Jan 6, 2025 · 1 comment
Open

Update to handle Poetry 2.x #701

loneil opened this issue Jan 6, 2025 · 1 comment

Comments

@loneil
Copy link
Contributor

loneil commented Jan 6, 2025

Steps to reproduce

  1. Start from fresh (no existing image)
  2. Have the dockerfile in oidc-controller just have RUN pip3 install --no-cache-dir poetry as the poetry install step (remove any version number, this has been fixed in main so the problem won't occur)
  3. in docker run ./manage build

There was a major version release of Poetry that started causing a build issue in VCAuthN. Fixed this by setting a specific poetry version in the dockerfile (which we should do anyways).

The error Poetry version 2 is throwing on build (during poetry install step)

4.878 Installing the current project: acapy-vc-authn-oidc (0.2.2)
4.880
4.880 Warning: The current project could not be installed: No file/folder found for package acapy-vc-authn-oidc
4.880 If you do not want to install the current project use --no-root.
4.880 If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
4.880 If you did intend to install the current project, you may need to set `packages` in your pyproject.toml file.
4.880
------
Dockerfile:9
--------------------
   7 |
   8 |     COPY pyproject.toml poetry.lock README.md ./
   9 | >>> RUN poetry install --only main
  10 |
  11 |     COPY ./oidc-controller .
--------------------
ERROR: failed to solve: process "/bin/sh -c poetry install --only main" did not complete successfully: exit code: 1

Fix above (likely a directory naming issue? In the dockerfile root? Or don't need to package up?)

Also check poetry docs to see if there's any improvements or other fixes needed
https://python-poetry.org/blog/announcing-poetry-2.0.0/

@esune
Copy link
Member

esune commented Jan 7, 2025

I think we could add the package definition (see acapy as an example) if it fixes the problem. This would make it possible to create/distribute a package artifact in the future if we wanted to. That being said, i don;t think that skipping packaging would be a big issue/drawback if it comes down to that.

@esune esune mentioned this issue Jan 7, 2025
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

No branches or pull requests

2 participants