Skip to content

Persist cache volumes on CI #1345

Closed
Closed

Description

@aluzzardi

Cache volumes (also known as core.#CacheDir in the 0.2 CUE SDK), uses the llb.AsPersistentCacheDir() call, the same that's used in Dockerfiles for e.g. RUN --mount=type=cache,target=/var/cache/apt .

The persistent cache dir is stored internally in BuildKit, which works great locally, however it's not persistent across CI runs (because we get a different BuildKit instance each time).

Ideally we should find a way to persist BuildKit's persistent cache directories into GH's cached directories.

A starting clue to figure this out is look into how people are solving the problem in Dockerfiles using --mount=type=cache.

/cc @samalba

Activity

  1. added this to the milestone on Jan 6, 2022
  2. jlongtine commented on Jan 10, 2022

    @jlongtine
    Contributor

    @aluzzardi I think this is relevant: moby/buildkit#1512

  3. jlongtine commented on Jan 10, 2022

    @jlongtine
    Contributor

    This might be relevant, as well: moby/buildkit#1545

  4. changed the title [-]Persist engine.#CacheDir on CI[/-] [+]Persist core.#CacheDir on CI[/+] on Apr 8, 2022
  5. added
    kind/bug
    on Jul 12, 2022
  6. added
    area/engine
    and removed on Dec 5, 2022
  7. changed the title [-]Persist core.#CacheDir on CI[/-] [+]Persist cache volumes on CI[/+] on Dec 21, 2022
  8. TomChv commented on Oct 30, 2023

    @TomChv
    Member

    I'm closing this issue since Dagger cloud actually fix this issue with a persistant cache across run

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

    area/enginekind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions