fpgmaas / cookiecutter-poetry

A modern cookiecutter template for Python projects that use Poetry for dependency management
https://fpgmaas.github.io/cookiecutter-poetry/
MIT License
380 stars 62 forks source link

GHA fails with dependencies not found: cache issue? #40

Closed ghost closed 2 years ago

ghost commented 2 years ago

I created a repo, did a few PRs which spawned GHA that worked fine. Then, I renamed the repo (typo!) and now the caching seems wrong. The Setup the environment gets a cache which contains nothing: no isort, black, or anything at all. This, of course, causes the next step to fail horribly:

🚀 Checking code formatting: Running isort
make: isort: Command not found
make: *** [Makefile:13: check] Error 127

Any idea what could be going wrong there?

fpgmaas commented 2 years ago

That is a strange issue. I just tried to replicate it by creating a private repository using the ccp command and filling in the prompts. I then created a Pull Request and the GH Actions ran successfully. I then renamed the repository, and updated the PR. The GH Actions still ran without an issue. Is there anything else other than the name of the repository that changed?

If not, it seems there simply is an issue with the cacheing mechanism., and as of yet there is no way to manually clear the cache. I would suggest raising an issue https://github.com/actions/cache?

The simplest solution approaches I can think of for now would be to:

Hope this helps!

ghost commented 2 years ago

As an experiment, I did:

So, I guess there must have been some issue at my end which caused an empty (or incomplete) cache to be generated. I think we can mark this ca closed. If anyone has the same issue, they can just add a new module and the cache should update – not sure what will happen if they remove it? ¯\_(ツ)_/¯