Skip to content

Fix CGO/CJS workflow cache key collision causing widespread job failures - #51342

Merged
pelikhan merged 2 commits into
mainfrom
copilot/cgo-fix-workflow-failure-again
Aug 8, 2026
Merged

Fix CGO/CJS workflow cache key collision causing widespread job failures#51342
pelikhan merged 2 commits into
mainfrom
copilot/cgo-fix-workflow-failure-again

Conversation

CopilotAI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The CGO workflow was failing across nearly every job (build, lint, fuzz, bench, etc.) with Failed to restore cache entry. Exiting as fail-on-cache-miss is set.

Root Cause

  • cgo.yml and cjs.yml both used the identical actions/cache key checkout-${{ github.sha }} for their checkout-cache pattern (save the checkout once, restore it in every downstream job).
  • When both workflows triggered on the same commit push, they raced to create/save the same cache entry. One workflow's save failed with Unable to reserve cache with key... another job may be creating this cache, leaving the other workflow's downstream jobs unable to restore it and failing hard.

Changes

  • Namespaced the cache key per workflow to eliminate the collision:
    • cgo.yml: checkout-${{ github.sha }}checkout-cgo-${{ github.sha }} (all save/restore steps)
    • cjs.yml: checkout-${{ github.sha }}checkout-cjs-${{ github.sha }} (all save/restore steps)
  • Confirmed no other workflow files reference the previously colliding key.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix workflow failure on main for fuzz jobFix CGO/CJS workflow cache key collision causing widespread job failuresAug 8, 2026
CopilotAI requested a review from pelikhanAugust 8, 2026 07:06
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: bug
  • Risk: low
  • Score: 78/100 (impact 40, urgency 25, quality 13)
  • Recommended action: fast_track

Fixes a systemic CI-breaking cache key collision affecting nearly every CGO/CJS job. Small, isolated 2-file diff. CI: unknown/no checks reported yet — recommend expedited human review given blast radius.

Generated by 🔧 PR Triage Agent · auto · 47.1 AIC · ⌖ 2.55 AIC · ⊞ 8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 8, 2026 14:58
CopilotAI balanced review requested due to automatic review settings August 8, 2026 14:58
@pelikhan
pelikhan merged commit c8042c9 into mainAug 8, 2026
@pelikhan
pelikhan deleted the copilot/cgo-fix-workflow-failure-again branch August 8, 2026 14:58

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Namespaces checkout caches by workflow, preventing CGO/CJS cache reservation collisions that caused issue #51321.

Changes:

  • Adds cgo and cjs identifiers to all matching cache save/restore keys.
  • Removes all uses of the previously shared key.
Show a summary per file
FileDescription
.github/workflows/cgo.ymlNamespaces CGO checkout cache keys.
.github/workflows/cjs.ymlNamespaces CJS checkout cache keys.

Review details

Tip

Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.2

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CGO][FUZZ] Workflow failure on main - Run #21561

3 participants

@pelikhan