Skip to content

Comments

Fix CI cache conflict causing tar file restoration failures#13355

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/fix-github-actions-workflow-test
Closed

Fix CI cache conflict causing tar file restoration failures#13355
Copilot wants to merge 3 commits intomainfrom
copilot/fix-github-actions-workflow-test

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

CI workflows failing with tar: Cannot open: File exists errors during Go module cache restoration. Both actions/setup-go@v6 (with cache: true) and explicit actions/cache@v4 steps were managing the same directories (~/go/pkg/mod, ~/.cache/go-build), causing conflicts when both attempted restoration.

Changes

  • Removed 11 redundant actions/cache steps for Go modules across all jobs
  • Removed 11 corresponding cache status reporting steps
  • Retained only actions/setup-go@v6 built-in caching

Before:

- uses: actions/setup-go@v6
  with:
    cache: true

- name: Cache Go modules (explicit fallback)  # ← Conflict
  uses: actions/cache@v4
  with:
    path: |
      ~/go/pkg/mod
      ~/.cache/go-build

After:

- uses: actions/setup-go@v6
  with:
    cache: true

Total reduction: 222 lines from .github/workflows/ci.yml

Original prompt

Fix the failing GitHub Actions workflow test
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 62279401252
Job URL: https://github.com/github/gh-aw/actions/runs/21610973323/job/62279401252


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 3, 2026 00:17
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
Copilot AI requested a review from pelikhan February 3, 2026 00:21
@pelikhan pelikhan closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants