Skip to content

Add option to skip health check for some repositories #3577

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

Closed
wants to merge 1 commit into from

Conversation

aswild
Copy link
Contributor

@aswild aswild commented Feb 24, 2018

Some large git repos (e.g. the Linux Kernel) take an excessively long
time to fsck, and the resulting failure messages pollute the Gitea
system notices with noise.

Add the field SKIP_REPOS to the [cron.repo_health_check] section of
app.ini which is a list of repos for which to skip the health check.

Implements: #1712
Signed-off-by: Allen Wild [email protected]

@codecov-io
Copy link

codecov-io commented Feb 24, 2018

Codecov Report

Merging #3577 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3577      +/-   ##
==========================================
- Coverage   35.79%   35.79%   -0.01%     
==========================================
  Files         285      285              
  Lines       40866    40873       +7     
==========================================
  Hits        14630    14630              
- Misses      24066    24074       +8     
+ Partials     2170     2169       -1
Impacted Files Coverage Δ
modules/setting/setting.go 47.39% <ø> (ø) ⬆️
models/repo.go 42.62% <0%> (-0.19%) ⬇️
models/repo_indexer.go 48.3% <0%> (ø) ⬆️

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 fc265b0...44681d5. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 24, 2018
@aswild
Copy link
Contributor Author

aswild commented Feb 24, 2018

I wrote this for myself since I host/mirror a couple big repos, and found that there was already an open but inactive issue for this exact feature.

It could be more user-friendly to have the "skip health check" option in the repo config itself, but the health checks are an admin activity, and I'm not aware of any other per-repo fields which are only accessible by admins. Plus, the app.ini implementation is much simpler and doesn't involve messing with the GUI pages or database schema.

I'm very new to Go, so any feedback is well-appreciated.

Some large git repos (e.g. the Linux Kernel) take an excessively long
time to fsck, and the resulting failure messages pollute the Gitea
system notices with noise.

Add the field SKIP_REPOS to the [cron.repo_health_check] section of
app.ini which is a list of repos for which to skip the health check.

Implements: go-gitea#1712
Signed-off-by: Allen Wild <[email protected]>
@lafriks
Copy link
Member

lafriks commented Feb 25, 2018

I think It would be better if that would be an option in repository settings

@lunny
Copy link
Member

lunny commented Feb 25, 2018

I agree with @lafriks

@aswild
Copy link
Contributor Author

aswild commented Feb 28, 2018

I agree too, this would be nicer as a repo settings option, so I'll try that instead.

Closing this PR, but please see my comments on #1712

@aswild aswild closed this Feb 28, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants