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

gitserver: add cleanup of old repos/branches #284

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

alessandro-sorint
Copy link
Contributor

@alessandro-sorint alessandro-sorint commented Nov 22, 2021

enhancement: automatic cleanup of old repos/branches

#FIX #29

Copy link
Member

@sgotti sgotti left a comment

Choose a reason for hiding this comment

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

@alessandro-sorint Thanks for your PR. Please see the inline comments. They're primarily related to the code and only some related to the logic. I haven't digged inside the real clean up logic but I think some things could be simplified a bit. I'll do this in the next review.

Can you please also add some tests?

P.S. Don't close this PR but just do your changes, squash your changes in a single commit and force push to your branch.

internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/main.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
@sgotti sgotti changed the title enhancement: automatic cleanup of old repos/branches gitserver: add cleanup of old repos/branches Jan 19, 2022
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 5 times, most recently from 9128744 to 5a5987c Compare January 24, 2022 08:50
internal/services/gitserver/main.go Outdated Show resolved Hide resolved
internal/services/config/config.go Outdated Show resolved Hide resolved
internal/services/config/config.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 3 times, most recently from b27a220 to 7d80a71 Compare February 1, 2022 09:36
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/config/config.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 10 times, most recently from 4e6e436 to 33c14ae Compare February 3, 2022 13:28
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 2 times, most recently from e30e857 to 819fb71 Compare February 3, 2022 15:38
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 2 times, most recently from 435a2dc to afdd153 Compare February 4, 2022 09:32
@alessandro-sorint alessandro-sorint force-pushed the repo-cleaner branch 3 times, most recently from c2c08f8 to d4bf015 Compare February 4, 2022 15:23
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/gitserver_test.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
internal/services/gitserver/repo-cleaner.go Outdated Show resolved Hide resolved
@sgotti
Copy link
Member

sgotti commented Feb 8, 2022

@alessandro-sorint Thanks! LGTM. Merging.

@sgotti sgotti merged commit 6081787 into agola-io:master Feb 8, 2022
@alessandro-sorint alessandro-sorint deleted the repo-cleaner branch February 14, 2022 14:53
tulliobotti64 pushed a commit to tulliobotti64/agola that referenced this pull request Oct 19, 2022
gitserver: add cleanup of old repos/branches
tulliobotti64 pushed a commit to tulliobotti64/agola that referenced this pull request Oct 19, 2022
gitserver: add cleanup of old repos/branches
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.

gitserver: automatic cleanup of old repos/branches
2 participants