Skip to content

fix(chopper): expire unused attic objects after 90 days - #114

Open
devusb wants to merge 1 commit into
mainfrom
chore/attic-retention
Open

fix(chopper): expire unused attic objects after 90 days#114
devusb wants to merge 1 commit into
mainfrom
chore/attic-retention

Conversation

@devusb

@devusb devusb commented Aug 29, 2026

Copy link
Copy Markdown
Owner

garbage-collection.interval was set to 14 days, but default-retention-period was never set. It defaults to Duration::ZERO, which disables time-based collection entirely — so the collector has been waking up every two weeks and deleting nothing, and the cache has been retaining everything since it was stood up.

This sets a 90 day default retention. Objects become eligible only when both created_at and last_accessed_at are older than the cutoff, so anything actively pulled keeps resetting its own clock.

Note for caches that must never expire

Attic excludes any cache whose effective retention is 0 from time-based GC (the GC query filters on retention_period.ne(0), falling back to the global default when the per-cache value is NULL). To pin one:

attic cache configure <cache> --retention-period "0s"

Watch out when reconfiguring such a cache later — attic cache configure resets retention_period to the global default whenever --retention-period is not passed, so pass it on every configure call for that cache.

Verification

  • nix eval .#nixosConfigurations.chopper.config.containers.attic.config.services.atticd.settings.garbage-collection{"default-retention-period":"90 days","interval":"14 days"}
  • nix fmt reports 0 changed files

Not yet deployed — this only changes the config.

https://claude.ai/code/session_01TMTHV4JBQMmtSLPoRkbZie

The collector ran every 14 days but default-retention-period was unset,
which defaults to zero and disables time-based collection, so the cache
grew without bound. Objects are now eligible once both created_at and
last_accessed_at are older than 90 days.

Claude-Session: https://claude.ai/code/session_01TMTHV4JBQMmtSLPoRkbZie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant