Skip to content

Monorepo split: static cache key and legacy origins make most runs take over an hour #3221

Description

@dpfaffenbauer

Recent "Monorepo split" runs: 2 min on a cache hit, 68–99 min on a miss (runs 33854457213 vs 33804159736, 33787292100, 33772663858). Two causes:

  1. actions/cache uses the static key gitsplit-cache. A cache is only saved when the key does not exist yet, so the split state never refreshes, and once the entry is evicted (the repo's 10 GB cache budget is shared with every PR's composer/npm/rsbuild caches; caches are also scoped per branch) the next run rebuilds the whole split history.
  2. .gitsplit.yml lists every version branch and every tag as origins — 10 branches and 203 tags for 64 split repositories. 2.x–4.0 are final and already live in the split repositories, so a miss re-splits history nobody changes.

Fix: key the cache per run (gitsplit-cache-${{ github.run_id }} + restore-keys: gitsplit-cache-) so every run saves a fresh snapshot and restores the newest, and restrict origins and the push trigger to the active lines (4.1, 5.0, 5.1, 2026.x and their tags).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions