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

Fix garbage collection for pulled modelkits #420

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

amisevsk
Copy link
Contributor

Description

When we pull a modelkit from a remote, we need to ensure its manifest descriptor is added to both the local index and the shared (non-scoped) index. Otherwise, garbage collection will fail -- kit remove <modelkit> will remove the manifest from the index and it won't appear in kit list, but the blobs referenced by the manifest will not be cleaned up there is no manifest to delete in the shared OCI index.

Calling delete on a non-existent manifest in the store will not trigger an error, so this issue was a little hard to notice.

Linked issues

N/A

When we pull a modelkit from a remote, we need to ensure its manifest
descriptor is added to both the local index and the shared (non-scoped)
index. Otherwise, garbage collection will fail -- `kit remove
<modelkit>` will not remove the pulled image, since garbage collection
will not kick in on the main backing OCI store.

Calling delete on a non-existent manifest in the store will not trigger
an error, so this issue is hard to notice.
@amisevsk amisevsk requested a review from gorkem July 19, 2024 21:19
Copy link
Contributor

@gorkem gorkem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gorkem gorkem merged commit bdf80fb into jozu-ai:main Jul 22, 2024
3 checks passed
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