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

Add an option to omit health checks for some repositories #1712

Closed
2 of 8 tasks
tobyp opened this issue May 12, 2017 · 10 comments
Closed
2 of 8 tasks

Add an option to omit health checks for some repositories #1712

tobyp opened this issue May 12, 2017 · 10 comments
Labels
type/enhancement An improvement of existing functionality

Comments

@tobyp
Copy link

tobyp commented May 12, 2017

Description

I keep a mirror of cpython on my gitea for convenience. A health check (git fsck) on it would take approximately 10 minutes. As this is a mirror, it is also completely unnecessary. I also don't want to raise the health check timeout that high.

It would be great to have an option to skip the health check for such repositories so my system notices and journal don't fill up so fast, possibly making me miss more important problems. This might be accomplished by:

  • An option in app.ini, under the existing cron.repo_health_check section
  • An option on the repository
@tobyp
Copy link
Author

tobyp commented May 12, 2017

I would be happy to work on this myself if you let me know whether such a feature is acceptable, and where it should be implemented.

@lunny
Copy link
Member

lunny commented May 12, 2017

@tobyp please send a PR

@lunny lunny added the type/enhancement An improvement of existing functionality label May 12, 2017
@lunny lunny added this to the 1.3.0 milestone May 12, 2017
@tobyp
Copy link
Author

tobyp commented May 19, 2017

I'm currently testing a patch for this. Took me a while to get Go and Drone set up correctly.

@bkcsoft
Copy link
Member

bkcsoft commented May 19, 2017

Mirrors should probably default to "off" ? 🙂

@lunny lunny modified the milestones: 1.3.0, 1.x.x Sep 22, 2017
aswild added a commit to aswild/gitea that referenced this issue 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: go-gitea#1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
aswild added a commit to aswild/gitea that referenced this issue 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: go-gitea#1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
@aswild
Copy link
Contributor

aswild commented Feb 28, 2018

After writing an app.ini implementation, I agree with reviewers that it'd be nicer to have this as a repo setting. I'll work on an implementation for that.

The main question: should this setting be only available for admin users? I think the answer should be yes. With that in mind, here's my idea

  • Add a new IsFsckEnabled bool field to the Repository struct (default true), with an appropriate DB migration
  • Add a new Admin Settings section on the main options page between Advanced Settings and Danger Zone, visible only to admin users, containing an option to toggle the new fsck enabled field.
    • If setting.Cron.RepoHealthCheck.Enable is false, should the UI option be disabled, or just print a warning that health check is disabled and the setting will have no effect?

@Pofilo
Copy link
Contributor

Pofilo commented Feb 28, 2018

In the same time, would it be a good idea to add an option to voluntary do the health checks ?
I don't know if such a feature exists.

@aswild
Copy link
Contributor

aswild commented Feb 28, 2018

@Pofilo do you mean an option to manually trigger the health checks rather than waiting for cron to do it? I added an Admin Dashboard option for that to my personal fork (aswild@31de6a9), it could be cherry-picked upstream but I'd consider that a separate issue/PR.

@lafriks
Copy link
Member

lafriks commented Mar 1, 2018

@aswild yes, please do submit PR about that ;)

aswild added a commit to aswild/gitea that referenced this issue Mar 2, 2018
New Feature:
  * Repository struct field for IsFsckEnabled (default true of course)
  * Admin Settings section on repo options page, accessible only by
    admin users

Possible Enhancements:
  * There's no way to force running health checks on all repos
    regardless of their IsFsckEnabled setting. This would be useful if
    there were an admin API or dashboard button to run fsck immediately.

Issue: go-gitea#1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
lunny pushed a commit that referenced this issue Mar 27, 2018
New Feature:
  * Repository struct field for IsFsckEnabled (default true of course)
  * Admin Settings section on repo options page, accessible only by
    admin users

Possible Enhancements:
  * There's no way to force running health checks on all repos
    regardless of their IsFsckEnabled setting. This would be useful if
    there were an admin API or dashboard button to run fsck immediately.

Issue: #1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
aswild added a commit to aswild/gitea that referenced this issue Apr 14, 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: go-gitea#1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
aswild added a commit to aswild/gitea that referenced this issue Apr 14, 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: go-gitea#1712
Signed-off-by: Allen Wild <allenwild93@gmail.com>
@stale
Copy link

stale bot commented Feb 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 7, 2019
@techknowlogick
Copy link
Member

This now exists. Closing issues.

@lunny lunny removed this from the 1.x.x milestone Feb 8, 2019
@lunny lunny removed the issue/stale label Feb 8, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

7 participants