You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
act version: 0.2.67
GOOS: linux
GOARCH: amd64
NumCPU: 16
Docker host: DOCKER_HOST environment variable is not set
Sockets found:
/var/run/docker.sock
Config files:
/home/bw81/.config/act/actrc:
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
Go version: go1.21.13
Module path: github.com/nektos/act
Main version: (devel)
Main path: github.com/nektos/act
Main checksum:
Build settings:
-buildmode: exe
-compiler: gc
-trimpath: true
CGO_ENABLED: 0
GOARCH: amd64
GOOS: linux
GOAMD64: v1
vcs: git
vcs.revision: 3f5d34d38dec16a3c4cec1e8aab00d5f123727b2
vcs.time: 2024-09-07T22:56:04Z
vcs.modified: true
Docker Engine:
Engine version: 27.1.1
Engine runtime: runc
Cgroup version: 1
Cgroup driver: cgroupfs
Storage driver: overlay2
Registry URI: https://index.docker.io/v1/
OS: Docker Desktop
OS type: linux
OS version:
OS arch: x86_64
OS kernel: 5.15.153.1-microsoft-standard-WSL2
OS CPU: 16
OS memory: 7898 MB
Security options:
name=seccomp,profile=unconfined
Command used with act
gh act -W .github/workflows/api-ci.yml -j 'lint'
Describe issue
The case of keys for cache artifacts being committed to the cache are forcibly normalized to lowercase. This causes the result of cache.restoreCache to return an all-lowercase key, even if the original key was submitted with uppercase characters. This deviates from the behavior of GitHub Actions, as while restore operations ignore case, the returned key's case is preserved. This causes issues for workflows which rely on using partial-matching keys to determine whether they need to update the cache, as seen in setup-ruby.
More specifically, setup-ruby uses the result of cache.restoreCache to determine whether the cache that was just restored is a partial hit (same runner/Ruby version, but different dependencies), or if it's a complete miss. It does this by directly comparing the result of cache.restoreCache with the expected result of the current cache key, and if the two are different, it will repopulate the cache. However, because the Bundler lockfile is case-sensitive (Gemfile.lock), the returned cache key and the expected cache key differ in case, so this comparison fails (see log output).
I've also reported this issue to ruby/setup-ruby, since GitHub Actions doesn't actually care about cache key case as far as I can tell (saving an all-uppercase key and restoring from an all-lowercase key works as expected). However, the behavior that cache keys are returned with the same case as they were saved may be important for some workflows, as evidenced by this issue.
Bug report info
Command used with act
gh act -W .github/workflows/api-ci.yml -j 'lint'
Describe issue
The case of keys for cache artifacts being committed to the cache are forcibly normalized to lowercase. This causes the result of
cache.restoreCache
to return an all-lowercase key, even if the original key was submitted with uppercase characters. This deviates from the behavior of GitHub Actions, as while restore operations ignore case, the returned key's case is preserved. This causes issues for workflows which rely on using partial-matching keys to determine whether they need to update the cache, as seen insetup-ruby
.More specifically,
setup-ruby
uses the result ofcache.restoreCache
to determine whether the cache that was just restored is a partial hit (same runner/Ruby version, but different dependencies), or if it's a complete miss. It does this by directly comparing the result ofcache.restoreCache
with the expected result of the current cache key, and if the two are different, it will repopulate the cache. However, because the Bundler lockfile is case-sensitive (Gemfile.lock
), the returned cache key and the expected cache key differ in case, so this comparison fails (see log output).Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
I've also reported this issue to
ruby/setup-ruby
, since GitHub Actions doesn't actually care about cache key case as far as I can tell (saving an all-uppercase key and restoring from an all-lowercase key works as expected). However, the behavior that cache keys are returned with the same case as they were saved may be important for some workflows, as evidenced by this issue.ruby/setup-ruby#659
The text was updated successfully, but these errors were encountered: