Skip to content

Checks fails on push to main: setup cache key collision between workflows #5214

Description

@pomfrida

Problem

The Checks run on push to main for 1243030 (#5209) failed in Check AI component index freshness, reporting all 23 /next components as missing from documentation/AI-COMPONENT-INDEX.md — even though the committed file on main is up to date.

Root cause

Five workflows call _setup.yml with the same cache key ${{ github.sha }} but different checkout_paths:

Workflow checkout_paths
checks.yaml packages apps scripts .github documentation
publish_storybook.yaml packages apps scripts
publish_core_react.yaml packages scripts
publish_data_grid.yaml packages scripts
publish_lab.yaml packages scripts

GitHub Actions caches are immutable — the first save wins. On this push, both Checks and Publish core-react storybook started at 09:42:29. The storybook setup saved the cache first (its workspace has no documentation/), and the Checks setup logged:

Failed to save: Unable to reserve cache with key 1243030…, another job may be creating this cache.

The Process packages job in Checks then restored the storybook variant, so documentation/AI-COMPONENT-INDEX.md did not exist in the workspace and generate:component-index --check treated the committed file as empty.

This was the first push to main since the freshness check landed (#5079) that also matched the storybook publish path filter — earlier docs/ci-only pushes never raced.

Fix

Give each workflow a unique setup cache key suffix, the same pattern publish_icons.yaml (-setup-icons) and publish_tokens.yaml (-setup-tokens) already use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions