Skip to content

Git cache PVC for faster repo operations #49

@oldsj

Description

@oldsj

Problem

Each K8s Job currently clones the repo from scratch. This is slow, especially for:

  • Implement/feedback cycles on the same task
  • Multiple tasks against the same repo
  • Larger repositories

Solution

Add a shared git cache PVC that persists across jobs:

/git-cache/
  github.com/
    oldsj/
      mainloop.git/      # bare repo cache
    someorg/
      their-repo.git/

Behavior

  1. First request for a repo → clone bare repo to cache
  2. Subsequent requests (any task)git fetch to update, clone locally from cache
  3. Different repo → clone that one too, cache grows over time

Jobs use git clone --reference /git-cache/... --dissociate for fast local clones.

Future: Project Management

Layer on top of cache:

  • Track which repos mainloop knows about in DB
  • Per-repo settings (default branch, CI requirements, etc)
  • /add-project command to register new repos

Metadata

Metadata

Assignees

No one assigned

    Labels

    dogfoodFound while dogfooding mainloop

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions