Cache save failure is silently successful
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I have a job with a cache save action step like:
- name: Cache build directory
uses: actions/cache@v2
with:
path: ./build
key: ${{ env.CACHE_VERSION }}-build-test
restore-keys: |
${{ env.CACHE_VERSION }}-build-test
This step fails with a warning from the cache service with 500 error:
Post job cleanup.
/usr/bin/docker exec 753ebc673e8c0bc1348b4c7c70cc7e429e7a567cc043866fb5d2a3684a233e5c sh -c "cat /etc/*release | grep ^ID"
/usr/bin/tar --posix -z -cf cache.tgz -P -C /__w/work-dir --files-from manifest.txt
Warning: uploadChunk (start: 0, end: 33554431) failed: Cache service responded with 500
That warning handling leads to successful job completion, and other job failing that tries to restore this cache later.
I believe the save cache action should fail on an error returned by the caching service.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the cache save path that handles the uploadChunk warning shown during post-job cleanup. Verify how cache-service errors are converted into the action result; done means a failed save causes the job to fail instead of completing successfully. The payload does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100