Skip to content

Poetry quick switch

Silvio Ankermann requested to merge feature/poetry-quick-switch into devel

Version Control Information

Source branch: feature/poetry-quick-switch
Target branch: devel

Currently, poetry creates one virtual environment for each directory and then updates it when poetry.lock is changed. This behavior is painful when switching branches often eg. during rebases. Also, different cluster repos that are on the same yk8s version still use different virtual environments.

This commit changes the poetry layout so that the environment depends solely on the hash of poetry.lock. This way, environments are now deduplicated between cluster repos. Additionally, they are now cached, so that switching to a version that has been seen before is now much quicker than before.

This comes at the cost of disk space for developers who actively work on the project (every cached revision needs ~500MiB as of now), so we may want to introduce garbage collection in the future. However, for those who only use yk8s to administer clusters, the disk usage can even decrease as they only need one env for each release instead one env for each cluster.


Description

Feel free to add further information about your MR in this section

Closes: #


Merge Prerequisites

  • MR title (and description) are descriptive
  • Code is readable and syntactically correct
  • Code is understandable
  • Documentation has been updated, if necessary
  • Commit messages look good
  • Release note file added in latest commit

As a developer: please do not tick these boxes yourself. As a reviewer: please get yourself a hot cold beverage.

Edited by Steve Starke

Merge request reports

Loading