Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Store garbage collection #10126

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreabedini
Copy link
Collaborator

This is a draft design for store garbage collection that I put together during ZuriHac. I admit I haven't explored existing designs.

The recipe is simple and similar to what nix does.

  • We keep updated a list of unit-ids that the project plan references just like we do with plan.json
  • At the same time we create a backlink from storedir/gc-root to the project dist directory.

This should allow garbage collection later on:

  • we check the gc-root directory for old roots and removes them (by checking whether the symlink resolves).
  • we traverse the dependency graph and do the proper garbage collection.
  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

bla bla

- Create backlinks from storedir/gc-root to the dist directory at the same time as
  we write the plan.json file.
- TODO: add top level command that
  1. checks the gc-root directory for old roots and removes them (by checking whether the symlink resolves).
  2. traverse the dependency graph and do the garbage collection.
@andreabedini
Copy link
Collaborator Author

@fgaz
Copy link
Member

fgaz commented Jun 19, 2024

I think we also need roots for installed executables

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.

2 participants