-
Notifications
You must be signed in to change notification settings - Fork 29
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
utilizing child requirement files in caches #326
Comments
This makes sense and it seems it would solve the problem. |
I'm not too fond of the option to duplicate packages across referenced envs. A flag to include SHA1s from all referenced envs sounds plausible. I'd like to clarify that the individual SHA1 generation logic should remain intact. And the same goes for checksum verification. The referenced SHA1s can go as comments below the header. But they don't need to be parsed back. |
@peterdemin yes, agreed. I'll give it a shot. thanks for the quick response |
Quick update, I will likely not have bandwidth to take this on right now but may be able to give it a shot in a few months. |
Given that you are generating a
prod.txt
anddev.txt
wheredev
is a child ofprod
. If you add/remove a dependency fromprod.txt
thendev.txt
is not necessarily modified at all sincedev.txt
simply includes-r prod.txt
. When combining this with env caching, it means you cannot generate the cache key using onlydev.txt
but instead have to include bothprod.txt
anddev.txt
in order to properly manage the invalidate/regenerate the cache.For example, in Github actions, because my project utilizes several different envs, I am forced to use a hash of all files in the
requirements
dir. This ends up with the cache key including${{ hashFiles('requirements/**.txt') }}
. This is imperfect since I am then overly aggressive with invalidation/regeneration since all envs will be purged if any of the envs are changed.Is there a better solution for this I am unaware of? Would we be open to an arg that tells
pip-compile-multi
to include all packages within the child.txt
(avoid using-r prod.txt
)? Or perhaps we could include the SHA1 of all parent files in the header comment?The text was updated successfully, but these errors were encountered: