Skip to content

Request: shorter unused-layer keepDuration / keepBytes for high-churn monorepos #126

Description

@seriouslag

Request

Please set (or expose a way for us to set) a shorter BuildKit unused-layer retention for our installation:

  • Target keepDuration: 48–72h (today’s hardcoded default is 192h / 8 days)
  • and/or a keepBytes cap on unused layers

Repo: InnerlightSoftware/nexus (many Dockerfiles, sticky-disk cache-key per Dockerfile via setup-docker-builder@v2).

Why

We correctly cache lockfile-keyed pnpm install layers. Inevitable one-shot layers (anything whose parent is COPY . . / turbo prune output / turbo build / pnpm deploy) still accumulate ~GB per commit per touched image. With main moving ~30×/day and affected-image detection, a layer untouched for ~3 days is effectively dead — but native GC keeps it for 8 days.

We already:

  • Shard per Dockerfile (cache-key)
  • Dropped the never-hit portal rematerialize install
  • Serialized scheduler-api + scheduler-worker onto one key

Storage is still dominated by those one-shot layers under the 8-day window. There is no workflow input for GC after v2 removed max-cache-size-mb.

References

Happy to move this to the dashboard support channel if that’s preferred.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions