Comments (9)
I've figured it out after hours. 😫
For some reason, actions/cache
does not like hidden directories being cached. That is, .cache
in my case. It's okay with zipping up and saving them, but the restore always 204s (no content).
Renaming .cache
to just cache
or something else fixes it. But I guess this is a bug likely in the backend since the POST goes through fine with the correct size.
EDIT: I had some issues with hidden files too, but might be unrelated to this.
from cache.
That would make sense. It would be nice to be able to download caches on our end in order to debug runs and see what's being restored.
from cache.
Hey @jahed,
I'd expect it to work on all repositories, so I don't think that would be an issue.
It might be helpful to turn on debug logging, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/managing-a-workflow-run#enabling-step-debug-logging
And if you want me to look at our internal logging to see what's going on, feel free to message me your repository name ([email protected]) or post it in this thread.
You may also want to try changing your path, I'm not sure if the ./
is required.
from cache.
I'll see if I can get anywhere with the debug logs and path change.
from cache.
Changing the path didn't do anything. With debug logging enabled there's not really much to see. There's a 204 and it misses the cache. On the other end there's a 200 and reports success.
This is a good chance for me to learn how to debug actions since my deployment pipeline relies on it. 😟
I'm guessing this repo can be forked and my workflow can switch over to the fork for additional debug logging.
I'll update if I get anywhere (it's the weekend so probably next week).
from cache.
@jahed Thanks! I would not expect that, do you have a repro project/workflow you could send me so I can look into this?
from cache.
i have some node modules that my custom actions depend on. i tried using hashfiles('.github/actions/package-lock.json')
and it didn't like it.
from cache.
I tried setting up a minimal reproduction but failed to reproduce the issue.
https://github.com/jahed/_actions-cache-repro
So that got me thinking. I moved my git repo to a new GitHub repo. Reverted back to .cache
and it's working now. Changing the directory name to make it not hidden was a red herring.
So whatever it was... I don't know. I didn't change anything other than migrate repos. So maybe the repo on GitHub is just old, had some incompatible settings, failed some backend migration or something. It's a bit of a black box.
Anyways, I'm going to close this since I can't reproduce it. I'm encountering other issues with the cache too but it just seems very random. Next time I report something, I'll setup a minimal reproduction first.
from cache.
@jahed Okay! Let me know if you need any help setting it up!
It's possible you had a corrupted cache at some point, and using the same key will keep fetching that cache over and over.
from cache.
Related Issues (20)
- use variables for setting path: key when using actions/cache ?
- cache/restore fails to hit if same paths given in different order
- Digital Banking & Trust
- actions/cache/restore@v3 is trying to use node 20 instead of 16 HOT 1
- Cannot mknod: Operation not permitted
- ## List and delete cache APIs are now available for managing your Actions Cache
- Cache does not restore due to an SSL problem
- Wrong Cache restore operation HOT 3
- Dereference symlinks when creating tar balls
- steps:%0A%20%20-%20uses%3A%20actions/checkout@v3%0A%0A%20%20-%20uses:%20actions/cache/restore@v3%0A%20%20%20%20id:%20cache%0A%20%20%20%20with:%0A%20%20%20%20%20%20path:%20path/to/dependencies%0A%20%20%20%20%20%20key:%20$%7B%7B%20runner.os%20%7D%7D-$%7B%7B%20hashFiles('**/lockfiles')%20%7D%7D%0A%20%20%20%20%20%20fail-on-cache-miss:%20true%0A%0A%20%20-%20name:%20Build%0A%20%20%20%20run:%20/build.sh
- Cache Incompatibility Between ARC and Non-ARC Runners in GitHub Actions
- cache restore timeouts - only on windows, only with larger (non-default) runner HOT 1
- Extremely slow Post Setup steps for actions/cache@v3 HOT 2
- `enableCrossOsArchive` appears to be broken-- unless I'm misunderstanding something HOT 1
- If the target path doesn't match the source path, restore reports "Cache not found for input keys"
- restore-keys not being tried when another other exact key has different scope
- Thank you lord 🙏 💓
- Cache-Hit output is null HOT 1
- Unexpected errors without any logs
- `cache@v4` not honoring the `save-always` parameter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache.