-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 cache test for admins #31265
Add cache test for admins #31265
Conversation
yes but esp if it,s a remote dep, it cold break afterwards and this is an easy way to test it |
If it breaks, either there will be 500 error / error log, or Gitea won't restart. I do not think it needs to "test it" manually on the admin panel, we shouldn't test everything manually there IMO. If it should be tested, what is the real "use case" for it? |
The "real" usecase is, as mentoined, to let gitea admins check if the cache works and if it is slow or not ... As gitea admins do not always have sys acces to logs etc... and if you have it in prod mode the 500 page will tell you nothing! (As it should) |
|
That's not true because it always shows the detail error messages if you are an admin. And if there is really something wrong, admin should check the logs. |
sorry but I personally see it as quality of life improvement for admins, if you don't need it it's fine but don't expect all others to have the same view |
Personally I don't mind such troubleshooting buttons. They are good to have when the need arises. |
Why not just re-use the "self check" page? Test everything automatically. |
Hmm, if self-check includes this check, then we should at least make self check call this function instead of having two duplicate check functions. |
Co-authored-by: delvh <dev.lh@web.de>
Fwiw, I don't see this as any different from the testing mail functionality, as not all code paths will fail if cache is unavailable (unlike if DB fails), and so adding the option for an admin to check would be good. I'll wait to review until the duplication reduction mentioned by @silverwind is handled. |
@techknowlogick add the check to the serftest too ... and mv it into a dedicated func with an unit test |
It's still not part of |
well it is indeed usefull to have it in the selve test but I realy want to have the manuall feedback for this specific part of gitea for admins ... and as we now just use the same func there is no much dublicated code at all |
I didn't mean block, I could refactor&improve the self-check page later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, let's take it then, to be hopefully improved later.
* giteaofficial/main: Fix rendered wiki page link (go-gitea#31398) Refactor repo unit "disabled" check (go-gitea#31389) Refactor route path normalization (go-gitea#31381) Refactor markup code (go-gitea#31399) Add cache test for admins (go-gitea#31265) Fix double border in system status table (go-gitea#31363) Improve rubygems package registry (go-gitea#31357) Fix natural sort (go-gitea#31384) Fix missing images in editor preview due to wrong links (go-gitea#31299) Add a simple test for AdoptRepository (go-gitea#31391) [skip ci] Updated licenses and gitignores
Add a test to probe the cache similar to the email test func.