Closed kleinjm closed 1 year ago
Looks like this may be related to https://github.com/actions/cache/issues/485#issuecomment-744145040
I'm sure I'm not the only one to run into this though so I'm curious if others have workarounds.
Fixed!
The issue was that my main
base branch was bundling all gems and my feature branches were excluding dev & prod gems with BUNDLE_WITHOUT: development:production
. Removing that env var fixed the issue by allowing the test builds to always use the same cache as the main branch.
Ensure the following before filing this issue
[X] I verified it reproduces with the latest version with
- uses: ruby/setup-ruby@v1
(see Versioning policy)[X] I tried to reproduce the issue locally by following the workflow steps (including all commands done by
ruby/setup-ruby
, except forDownloading Ruby
&Extracting Ruby
), and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
The workflow code or a link to the workflow file
Link to the log of a failed workflow job, or to a gist with the output
https://gist.github.com/kleinjm/234db05590cbd13e7b6e6a9eb75b1e9d
The command and output of the failing step
Any other notes?
We run 2 ruby jobs for linting and checks and 2 jobs for tests; one unit and one system. The test jobs are parallelized 4X each.
The linting/check jobs and the unit tests never get a cache hit on the bundler cache. However, the system tests and reruns of failed unit tests do get a cache hit.
At the end of each job, the cache will either save or fail to save because it already exists.
I can see the cache key in the GH actions UI and have verified is exactly the same between jobs.
The issue is that the cache should be working on all jobs. Fixing this will shave about a minute off of each job so thanks in advance for the help.