Skip to content

ci: run the cache janitor at the end of the merge queue and enforce the 10 GB budget by LRU #1854

Closed

Description

@zackees

Refs #1269, #1723, forge-ci/ci.yml#405.

Problem

The declared cache families now total about 16.2 GB, against the 10 GB repository limit. The maintainer accepts that. But when live usage goes over 10 GB, GitHub evicts by its own LRU order and can drop a seed a required job restores. That is the #1269 failure.

The cache janitor currently runs in ci-pre.yml, at the start of merge-group and master-push runs. It evicts only within families, so it neither sees what the queue run saves nor keeps the repo total under budget.

Change

  1. Move the cache janitor to the end of the merge queue run: a final ci.yml job, needs: every other job, if: always() && github.event_name == 'merge_group', keeping the repo-wide cache-janitor concurrency group (never cancelled). The merge queue serializes master writes, so this point has exclusive access to the cache. Master-push sweeps stay as they are.
  2. Bump the zackees/ci.yml pin to the release that adds repo-wide LRU eviction down to [cache].budget (policy: merge queue on every repo; end-of-queue janitor enforces the repo cache budget by LRU forge-ci/ci.yml#405). The janitor then keeps total usage ≤ 10 GB itself, oldest-accessed first, never deleting a family's newest restored entry or an entry younger than 10 minutes.
  3. Keep ci-gate independent of the janitor: a janitor failure is reported and does not eject the PR from the queue.

Acceptance

  • RED → GREEN CI test (ci/): the merge-group janitor job exists, is last (needs covers every other job), runs only on merge_group, and calls cache janitor at the pinned version.
  • No new workflow file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions