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

Clean up repo cache when repository is removed #4049

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

mortent
Copy link
Contributor

@mortent mortent commented Sep 22, 2023

This fixes an issue where the git cache on the local filesystem does not get clean up when a repository is removed. This means that if the same repo is later added again, the local cache will be used, even if it might be stale at that point.

The fix here adds logic for checking if an underlying repo is used by several Porch repositories by listing the existing repositories known to Porch. It will only clean up a repo if it is not being shared. And when it gets cleaned up, it will make sure to also delete the local cache.

@mortent mortent merged commit c36a94e into kptdev:main Sep 26, 2023
11 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.

3 participants