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

ci: 🎡 use cache with poetry #314

Merged
merged 16 commits into from
May 27, 2022
Merged

ci: 🎡 use cache with poetry #314

merged 16 commits into from
May 27, 2022

Conversation

severo
Copy link
Collaborator

@severo severo commented May 25, 2022

No description provided.

@severo
Copy link
Collaborator Author

severo commented May 25, 2022

We have errors, due to the relative dependencies:

 Creating virtualenv admin in /home/runner/work/datasets-server/datasets-server/services/admin/.venv
Installing dependencies from lock file

  RuntimeError

  [BUG]  libutils (0.1.0) is not satisfied.

@severo
Copy link
Collaborator Author

severo commented May 27, 2022

Note that libutils is depended by libcache and libqueue, which are both dependencies of the services. Maybe due to this double dependency (related to this? python-poetry/poetry#1757 (comment) - note that I cannot reproduce: it works for me when launched directly on my machine, the issue seems to be related to the poetry cache in actions/setup-python)

@severo
Copy link
Collaborator Author

severo commented May 27, 2022

Last fix does not work:

Error: Invalid pattern '../../libs/libutils/poetry.lock'. Relative pathing '.' and '..' is not allowed.

@severo severo force-pushed the use-cache-in-poetry-actions branch from 68b981e to 6319780 Compare May 27, 2022 08:25
@severo
Copy link
Collaborator Author

severo commented May 27, 2022

Last fix: still the same error (https://github.com/huggingface/datasets-server/runs/6622451310?check_suite_focus=true)

 [BUG]  libutils (0.1.0) is not satisfied.

@severo
Copy link
Collaborator Author

severo commented May 27, 2022

The bug is not due to the cache: poetry line!

@severo severo force-pushed the use-cache-in-poetry-actions branch from 756b566 to 1486193 Compare May 27, 2022 09:02
@severo
Copy link
Collaborator Author

severo commented May 27, 2022

Finally, it works! Seems like we need to:

  • install poetry twice (before setup-python, then after, with another method)
  • use a global virtualenv, not an in-path env

Capture d’écran 2022-05-27 à 11 05 19

@severo severo force-pushed the use-cache-in-poetry-actions branch from 81993f0 to 14f30cf Compare May 27, 2022 14:56
severo added 2 commits May 27, 2022 15:15
* feat: 🎸 build the local libraries

This way, we refer to a specific version, with a related hash, which
help for the cache entries (in github actions)

* ci: 🎡 enable all the actions
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.

1 participant