-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(ci): enable pip
cache
#198
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Hi @SauravMaheshkar, thanks for opening a PR! If I understand it correctly this integration hashes the requirements/setup files to cache dependencies. In that case we would be quite blind to breaking changes from new versions of a library, right? |
@lvwerra as far as I understand, the action reuses cache if the files listed under the |
I think the issue is that we don't change the files in question often so it is possible that there are breaking changes that we don't notice because we never updated the cached files. Is there an option to set a cache lifetime? |
AFAIK there isn't a option to set cache lifetime however we can use the |
Hi @SauravMaheshkar, not sure I follow how the cache-hit would help. I would like to at least clear the cache once every 1-2 days since libraries might be updated that the we won't install due to caching. |
Hey @lvwerra thanks for the feedback, you do make an interesting case. Upon searching around for a bit, we can create another workflow similar to the one in the Github Docs which can clear all the caches every |
Do you want me to work on that as well in this PR ? |
Hi @SauravMaheshkar, yes, if we can delete the cache every 1-2 days adding caching would be a good feature. |
Awesome work @SauravMaheshkar , that looks great to me! What do you think @younesbelkada ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this awesome feature!
I am totally ok for this PR, I just have few (basic) questions
- Where the duration of the cache refreshing mechanism (you stated each 1 or 2 days) can be changed on the file you have added?
- Why the changes on
tests.yml
are needed? It seems to be applied only on python 3.8, do we need to change it as well for other python versions?
Thanks a lot!
For the first question |
Awesome thank you! |
We can run the tests on other python versions as well. The changes proposed by this PR is independent of the python version. We can test for more python versions as well. |
Thanks a lot for clarifying!
I am a bit confused by this, can you elaborate a bit more on that? Also I can see that the modified block on Again thank you! |
Hi @SauravMaheshkar just to double check: it seems like the cache is only a pip download cache and the libraries still need to be installed (which takes a significant amount of time). Is this expected? |
Yes it's just a download cache AFAIK |
This PR sets the
cache
andcache-dependency-path
argument ofactions/setup-python
to enable pip caching.