actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.37k stars 1.16k forks source link

Emit a warning instead of a silent failure when zstd is missing #1285

Open dekimsey opened 7 months ago

dekimsey commented 7 months ago

Issue

I recently attempted to save and restore a cache between my self-hosted OSX runners and the GH-hosted ones. However I was unable to get this working, as I receiving a key not found error.

Background

It came down to the fact that the compression tool is a hidden flag on the cache (the "version"). Which I had a lot of trouble discovering (UI, API calls, error messages, or default logs).

Only when I executed both the save and restore with debug logging enabled was I able to determine zstd was missing on my on-premise hosts.

Examples: On-premise save logs:

##[debug]Checking zstd --quiet --version
##[debug]Unable to locate executable file: zstd. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

vs. GH-hosted restore logs:

##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5

This is with enableCrossOsArchive enabled on both sides.

Request

To make this kind of failure more obvious to users, I'd like to propose:

While I now understand how we got this happened, I'd like to make sure others in the future are more easily able to understand and address the issue.

Thank you!

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

dekimsey commented 1 month ago

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

Still valid