Description
Environment:
- CI/CD System: Gitea Actions using a custom runner on Docker via Portainer
- Code Repository: Hosted on Gitea v1.23.3 running on an Ubuntu machine (Proxmox VM)
- External Cache Server: FalconDev OSS GitHub Actions Cache Server
- Project Context: Cache issues in the CI/CD pipeline for the project
Issue Description:
I am encountering repeated failures during the cache restoration step in my Gitea Actions workflow. Despite successful cache storage (as indicated by the CI logs), attempts to restore the cache result in errors related to "unsupported format".
Error Logs:
Here are snippets from the CI/CD logs that show both the successful cache save and the failed restore attempts:
Cache Save Log:
[command]/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /workspace/vedus/mlaw-backend --files-from manifest.txt --use-compress-program zstdmt
Cache Size: ~32 MB (33435083 B)
Cache saved successfully
Cache saved with key: linux-bun-cache
✅ Success - Post Restore cache
Cache Restore Log:
Cache Size: ~0 MB (231 B)
[command]/usr/bin/tar -xf /tmp/fe9e3ad9-458c-43d2-9f4b-d24750b2c798/cache.tzst -P -C /workspace/vedus/mlaw-backend --use-compress-program unzstd
zstd: /*stdin*\: unsupported format
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now
::warning::Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Cache not found for input keys: linux-bun-cache
Workflow Configuration for Cache:
- name: Restore cache
id: cache-bun
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
./node_modules
key: linux-bun-cache
Steps to Reproduce:
- Trigger the GitHub Actions workflow.
- Observe the caching step fails during the execution of the restore cache action.
Expected Behavior:
Cache should be restored without any format or decompression errors, utilizing the earlier saved cache to fast-track the build and test processes.
Actual Behavior:
Cache restoration fails owing to an "unsupported format" error from zstd
and consequential failures from tar
, blocking the utilization of the cached data.
Troubleshooting Done:
- Checked and confirmed
zstd
is operational and consistent across environments. - Manual decompression tests of cache file mimicking the CI environment.
Request for Assistance:
Could anyone provide insights or suggestions on resolving these decompression issues? It's unclear if this problem stems from how the data is being compressed/stored by our third-party cache server or if it might be a configuration mishap on our end involving zstd
and tar
.
Attachments:
- CI/CD complete logs for the cache storage and restoration process.