awscli-login icon indicating copy to clipboard operation
awscli-login copied to clipboard

Github Actions Cache should be invalidated when Python binary changes

Open ddriddle opened this issue 4 years ago • 2 comments

Tox will rebuild the wheel virtual environment when the Python binary sha256sum changes (See #75). The Tox documentation states that a virtual environment will automatically be rebuilt on the following conditions:

Here’s what traits we track at the moment for each steps:

  • virtual environment trait is tied to the python path the basepython resolves too (if this config changes, the virtual environment will be recreated),
  • deps sections changes (meaning any string-level change for the entries, note requirement file content changes are not tracked),
  • library dependencies are tracked at extras level (because there’s no Python API to enquire about the actual dependencies in a non-tool specific way, e.g. setuptools has one way, flit something else, and poetry another). https://tox.readthedocs.io/en/latest/example/general.html#dependency-changes-and-tracking

We need to ensure that the cache is invalided on each of these conditions.

ddriddle avatar Jun 15 '21 14:06 ddriddle

Closing this as it was addressed in #75.

edthedev avatar Jul 07 '21 14:07 edthedev

@edthedev #75 does not address this issue. This still needs to be addressed, either by embedding the sha of the python binary in the cache key, or by an update to the cache validation module. I'm not sure which is more feasible without giving it more thought. Honestly, caching tox has enough complexities I should do a presentation on it or write a blog post.

ddriddle avatar Jul 07 '21 15:07 ddriddle