Gitea: Add an option to omit health checks for some repositories

Created on 12 May 2017  路  10Comments  路  Source: go-gitea/gitea

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
kinenhancement

All 10 comments

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.

@tobyp please send a PR

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

Mirrors should probably default to "off" ? 馃檪

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?

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.

@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 (https://github.com/aswild/gitea/commit/31de6a93aff325fad2a809be52a6ef717aeea247), it could be cherry-picked upstream but I'd consider that a separate issue/PR.

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

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.

This now exists. Closing issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cookiengineer picture cookiengineer  路  3Comments

kolargol picture kolargol  路  3Comments

thehowl picture thehowl  路  3Comments

jorise7 picture jorise7  路  3Comments

internalfx picture internalfx  路  3Comments