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

Show deprecated config settings in UI #25994

Closed
jolheiser opened this issue Jul 19, 2023 · 9 comments
Closed

Show deprecated config settings in UI #25994

jolheiser opened this issue Jul 19, 2023 · 9 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@jolheiser
Copy link
Member

jolheiser commented 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

@jolheiser jolheiser added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 19, 2023
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jul 20, 2023

I think it needs a "self-check" page (ref :#24392 (comment) )

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.

@lunny
Copy link
Member

lunny commented Jul 20, 2023

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

@wxiaoguang
Copy link
Contributor

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.

@lunny
Copy link
Member

lunny commented Jul 20, 2023

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

@delvh
Copy link
Member

delvh commented Jul 20, 2023

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

@lunny
Copy link
Member

lunny commented Jul 20, 2023

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

Of course it should not.

@delvh
Copy link
Member

delvh commented 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?

@lunny
Copy link
Member

lunny commented 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 added a commit that referenced this issue Jul 26, 2023
… file (#26094) (#26154)

backport #26094 
Temporily resolve #25915
Related #25994

This PR includes #26007 's changes but have a UI to prompt administrator
about the deprecated settings as well as the log or console warning.
Then users will have enough time to notice the problem and don't have
surprise like before.

<img width="1293" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/c33355f0-1ea7-4fb3-ad43-cd23cd15391d">
@wxiaoguang
Copy link
Contributor

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

Feel free to reopen if I missed anything.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants