Add a new command doctor to check if some wrong configurations on gitea instance#9095
Add a new command doctor to check if some wrong configurations on gitea instance#9095sapk merged 5 commits intogo-gitea:masterfrom
Conversation
|
This is about #8781 |
Codecov Report
@@ Coverage Diff @@
## master #9095 +/- ##
=========================================
Coverage ? 42.17%
=========================================
Files ? 592
Lines ? 78156
Branches ? 0
=========================================
Hits ? 32963
Misses ? 41146
Partials ? 4047
Continue to review full report at Codecov.
|
|
@lunny Is this considered WIP currently, or implement the one check and add more with other PRs? |
cmd/doctor.go
Outdated
There was a problem hiding this comment.
May be give the users some hints about this kind of catastrophic failure (e.g. "make sure to use a --config directive", "check if the --config file points to the right file", "make sure you have the right permissions", etc.) even if the problem might not be related to any of the listed hints.
|
@jolheiser Not WIP, I just want to add a framework and add more checkes on late PRs. |
|
because it |
|
@lunny can you add docs about this feature? |
I'd suggest not delaying this any longer, so others could start adding functions to it as well. 😉 Docs can wait to another PR, IMHO. |
|
@sapk @guillep2k done. |
|
@lunny thanks |
…#10991) * Mulitple Gitea Doctor improvements (#10943) Backport #10943 * Add `gitea doctor --list` flag to list the checks that will be run, including those by default * Add `gitea doctor --run` to run specific checks * Add `gitea doctor --all` to run all checks * Add db version checker * Add non-default recalculate merge bases check/fixer to doctor * Add hook checker (Fix #9878) and ensure hooks are executable (Fix #6319) * Fix authorized_keys checker - slight change of functionality here because parsing the command is fragile and we should just check if the authorized_keys file is essentially the same as what gitea would produce. (This is still not perfect as order matters - we should probably just md5sum the two files.) * Add SCRIPT_TYPE check (Fix #10977) * Add `gitea doctor --fix` to attempt to fix what is possible to easily fix * Add `gitea doctor --log-file` to set the log-file, be it a file, stdout or to switch off completely. (Fixes previously undetected bug with certain xorm logging configurations - see @6543 comment.) Signed-off-by: Andrew Thornton <[email protected]> * Switch to io.Writer instead of io.StringWriter Signed-off-by: Andrew Thornton <[email protected]>
When gitea's path is not changed.
When gitea's path changed.
