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

Update repository size on cron gc task #15177

Merged
merged 6 commits into from
Mar 28, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Mar 27, 2021

git gc cron could change the size of the repository therefore we should update the
size of the repo stored in our database.

Also significantly improve the efficiency of counting lfs associated with the
repository

Fix #14862

Signed-off-by: Andrew Thornton art27@cantab.net

git gc cron could change the size of the repository therefore we should update the
size of the repo stored in our database.

Also significantly improve the efficiency of counting lfs associated with the
repository

Fix go-gitea#14682

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.0 milestone Mar 27, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 27, 2021
@codecov-io
Copy link

Codecov Report

Merging #15177 (467e294) into master (290cf75) will increase coverage by 0.15%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15177      +/-   ##
==========================================
+ Coverage   43.38%   43.54%   +0.15%     
==========================================
  Files         668      668              
  Lines       80620    80624       +4     
==========================================
+ Hits        34980    35107     +127     
+ Misses      39946    39809     -137     
- Partials     5694     5708      +14     
Impacted Files Coverage Δ
modules/repository/check.go 0.00% <0.00%> (ø)
models/repo.go 53.72% <100.00%> (-0.09%) ⬇️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/util/remove.go 65.38% <0.00%> (-15.39%) ⬇️
models/lfs.go 17.92% <0.00%> (-4.72%) ⬇️
modules/process/manager.go 72.83% <0.00%> (-2.47%) ⬇️
services/pull/pull.go 42.82% <0.00%> (-0.49%) ⬇️
models/error.go 38.57% <0.00%> (+0.47%) ⬆️
models/repo_list.go 78.76% <0.00%> (+0.88%) ⬆️
services/pull/check.go 26.02% <0.00%> (+2.05%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 290cf75...467e294. Read the comment docs.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 27, 2021
@6543
Copy link
Member

6543 commented Mar 28, 2021

🚀

@6543 6543 merged commit 82d1a7f into go-gitea:master Mar 28, 2021
@zeripath zeripath deleted the fix-14682-update-size-cron-gc branch March 28, 2021 11:52
@silverwind
Copy link
Member

Related regression: #15634

@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo size on web isn't updated after Auto GC
7 participants