Show deprecated config settings in UI #11282

Closed
opened 2025-11-02 09:33:16 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @jolheiser on GitHub (Jul 19, 2023).

Feature Description

https://github.com/go-gitea/gitea/blob/main/modules/setting/config_provider.go could be expanded to also collect deprecated settings and show them on the UI (perhaps in the Admin interface?).

I'm not sure whether a banner message or notification would serve better in this regard.

This may be easier than grepping logs for deprecated settings.

Screenshots

No response

Originally created by @jolheiser on GitHub (Jul 19, 2023). ### Feature Description https://github.com/go-gitea/gitea/blob/main/modules/setting/config_provider.go could be expanded to also collect deprecated settings and show them on the UI (perhaps in the Admin interface?). I'm not sure whether a banner message or notification would serve better in this regard. This may be easier than grepping logs for deprecated settings. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:33:16 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 20, 2023):

I think it needs a "self-check" page (ref :https://github.com/go-gitea/gitea/pull/24392#issuecomment-1527385786 )

What about adding a "self check" page in site admin?
It could do a full self check, including:

  1. database versions (pgsql, mysql, etc)
  2. database charsets (mysql), not only just checking default, but check all columns.
  3. reverse proxy rewriting and sub path (eg: is %2F kept?)
  4. system time (to resolve incorrect OTP problems)
  5. system health like free disk, etc

And a lot of errors/warnings can be shown there (including "Add logs to tell users they should move some of their legacy custom public files" in #25974)

For the "config options", I think we also need our own INI package to see whether a config option is really read(used). If any config key is not used, it should also remind the users that "you have misconfiguration in your app.ini", it could avoid a lot of low-level mistakes.

@wxiaoguang commented on GitHub (Jul 20, 2023): I think it needs a "self-check" page (ref :https://github.com/go-gitea/gitea/pull/24392#issuecomment-1527385786 ) > What about adding a "self check" page in site admin? > It could do a full self check, including: > 1. database versions (pgsql, mysql, etc) > 2. database charsets (mysql), not only just checking default, but check all columns. > 3. reverse proxy rewriting and sub path (eg: is `%2F` kept?) > 4. system time (to resolve incorrect OTP problems) > 5. system health like free disk, etc And a lot of errors/warnings can be shown there (including "Add logs to tell users they should move some of their legacy custom public files" in #25974) For the "config options", I think we also need our own INI package to see whether a config option is really read(used). If any config key is not used, it should also remind the users that "you have misconfiguration in your app.ini", it could avoid a lot of low-level mistakes.
Author
Owner

@lunny commented on GitHub (Jul 20, 2023):

Not only a self-check page, maybe it should also a self-fix page?

@lunny commented on GitHub (Jul 20, 2023): Not only a self-check page, maybe it should also a self-fix page?
Author
Owner

@wxiaoguang commented on GitHub (Jul 20, 2023):

Only a few can be fixed by Gitea itself.

But Gitea can fix none of "database version", "incorrect config", "proxy rewriting", "system time", "free disk" and even more.

@wxiaoguang commented on GitHub (Jul 20, 2023): Only a few can be fixed by Gitea itself. But Gitea can fix none of "database version", "incorrect config", "proxy rewriting", "system time", "free disk" and even more.
Author
Owner

@lunny commented on GitHub (Jul 20, 2023):

We can also have a topbar warning like ROOT_URL which only displayed on admin panel or admin's UI.

@lunny commented on GitHub (Jul 20, 2023): We can also have a topbar warning like ROOT_URL which only displayed on admin panel or admin's UI.
Author
Owner

@delvh commented on GitHub (Jul 20, 2023):

Don't show the user things that are only intended for admins.

@delvh commented on GitHub (Jul 20, 2023): Don't show the user things that are only intended for admins.
Author
Owner

@lunny commented on GitHub (Jul 20, 2023):

Don't show the user things that are only intended for admins.

Of course it should not.

@lunny commented on GitHub (Jul 20, 2023): > Don't show the user things that are only intended for admins. Of course it should not.
Author
Owner

@delvh commented on GitHub (Jul 20, 2023):

Ah, so only show it for admins?
That sounds like a better idea.
You mean something like The site config seems outdated, please have a look in the admin panel?

@delvh commented on GitHub (Jul 20, 2023): Ah, so only show it for admins? That sounds like a better idea. You mean something like `The site config seems outdated, please have a look in the admin panel`?
Author
Owner

@lunny commented on GitHub (Jul 20, 2023):

Ah, so only show it for admins? That sounds like a better idea. You mean something like The site config seems outdated, please have a look in the admin panel?

Yes, and when click, it will display a page which will list all the deprecated configurations. I remember you have created a PR which do a similar thing?

@lunny commented on GitHub (Jul 20, 2023): > Ah, so only show it for admins? That sounds like a better idea. You mean something like `The site config seems outdated, please have a look in the admin panel`? Yes, and when click, it will display a page which will list all the deprecated configurations. I remember you have created a PR which do a similar thing?
Author
Owner

@wxiaoguang commented on GitHub (May 7, 2024):

Now they are shown on the "Self Check" page.

Feel free to reopen if I missed anything.

@wxiaoguang commented on GitHub (May 7, 2024): Now they are shown on the "Self Check" page. Feel free to reopen if I missed anything.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11282