julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 9 forks source link

Unique cache-key for job matrix objects #88

Closed omus closed 11 months ago

omus commented 11 months ago

Changes how the default cache key is generated such that YAML objects in the matrix are expanded upon and not just returned as "Object". Due to use combining so many values from the matrix I've also decided to include the key name in the cache key.

The change here should be non-breaking but will result in cache misses when users first update to this version.

Fixes #87.

omus commented 11 months ago

Still have some details to work out with the tests. Would be nice to have the tests not specify cache-name.

IanButterworth commented 11 months ago

We can't really use jq as it's not guaranteed to be installed on self-hosted runners

IanButterworth commented 11 months ago

If we did I think we'd have to make a breaking change, which I wanted to avoid so that the ecosystem gets the benefit without changing anything

omus commented 11 months ago

PR's ready for review. I'll mention that introducing the matrix keys into the cache key isn't strictly necessary but I think it's helpful when you have matrices with lots of options. It does make the cache names in GitHub actions much longer but I think the additional context which is added is more helpful for humans in identifying which cache entry they want to manually delete.

omus commented 11 months ago

Noticed a README update I need to do

musoke commented 10 months ago

FYI: this change seems to have broken one of my CI runs. I think the problem is that I'm running in a container on a GitHub hosted runner, so jq isn't installed.
v1.4.1 works but v1.5.1 does not.

here's a log: https://github.com/musoke/WolframExpr.jl/actions/runs/7532058237/job/20501935392#step:5:65