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

Cache pip packages per version rather than per project #5685

Closed
stsewd opened this issue May 9, 2019 · 5 comments
Closed

Cache pip packages per version rather than per project #5685

stsewd opened this issue May 9, 2019 · 5 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented May 9, 2019

We are currently saving the pip cache per project, which can lead to some weird deps problems when building from different versions.

https://github.com/rtfd/readthedocs.org/blob/768856e3f72fd0ec1e4fbe9eab8913cb5f01b490/readthedocs/projects/models.py#L616-L621

Ref #5680 (comment)

@stsewd stsewd added Improvement Minor improvement to code Needed: design decision A core team decision is required labels May 9, 2019
@humitos
Copy link
Member

humitos commented May 23, 2019

which can lead to some weird deps problems when building from different versions.

What are these problems?

@stsewd
Copy link
Member Author

stsewd commented May 23, 2019

Different versions have different requirements, dependencies of another dependencies, etc.

@stsewd
Copy link
Member Author

stsewd commented May 23, 2019

Also if the cache gets corrupted, users need to wipe in order to get it working again.

And we can't clean the cache in #5680

@humitos
Copy link
Member

humitos commented May 23, 2019

Also if the cache gets corrupted, users need to wipe in order to get it working again.

I don't think we are having this problem.

And we can't clean the cache in #5680

There is no need to save a cache if we are going to clean it after use it once. If that's what we want, we just don't need to save the cache at all. We can use,

  • do not mount a a volume outside the docker container
  • use --no-cache-dir option in pip

Having a per-version pip cache does not makes too much sense to me.

@agjohnson
Copy link
Contributor

I'm going to close this, I think it goes against our goal of removing caching entirely. If we weren't on this path, it would be a helpful feature, but I think the benefits ephemeral build process bring will trump any gains by tuning caching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

3 participants