Fix CI cache conflict causing tar file restoration failures#13355
Closed
Fix CI cache conflict causing tar file restoration failures#13355
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
The CI workflow had both actions/setup-go with cache: true and a separate actions/cache step managing the same directories. This caused tar errors during cache restoration when files already existed from one cache mechanism trying to restore while the other was also managing the same files. Fix: Remove the redundant actions/cache steps and rely solely on the built-in caching provided by actions/setup-go@v6. This resolves the tar errors: - /usr/bin/tar: file.go: Cannot open: File exists - Failed to restore: tar failed with exit code 2 Fixes #13355 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow test
Fix CI cache conflict causing tar file restoration failures
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI workflows failing with
tar: Cannot open: File existserrors during Go module cache restoration. Bothactions/setup-go@v6(withcache: true) and explicitactions/cache@v4steps were managing the same directories (~/go/pkg/mod,~/.cache/go-build), causing conflicts when both attempted restoration.Changes
actions/cachesteps for Go modules across all jobsactions/setup-go@v6built-in cachingBefore:
After:
Total reduction: 222 lines from
.github/workflows/ci.ymlOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.