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

Add/edit the mailer through the web interface after setup #1714

Open
2 of 7 tasks
gayprogrammer opened this issue May 12, 2017 · 8 comments
Open
2 of 7 tasks

Add/edit the mailer through the web interface after setup #1714

gayprogrammer opened this issue May 12, 2017 · 8 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@gayprogrammer
Copy link

gayprogrammer commented May 12, 2017

  • Gitea version (or commit ref): 9a0b0da
  • Git version: 2.12.2
  • Operating system: Windows Server 2012
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant (I am not administrator on try.gitea.io)
  • Log gist: NA

Description

I would like to ask for the ability to add the mailer through the web interface after setup. Also I think it is common sense to be able to edit the mailer configuration through the web interface. I did not initially set one up, so my custom app.ini config only contained:
[mailer]
ENABLED = false
When I changed this to true, Gitea failed to start. I found in the log:
2017/05/12 10:37:51 [...s/setting/setting.go:1274 newMailService()] [E] Invalid mailer.FROM (): mail: no address
This field was not in my config, so I had to copy it from source and complete the configuration before I could get Gitea to start.

@kolaente
Copy link
Member

I think we should enable overall configuration through the webinterface after installing, not only for mail settings

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label May 14, 2017
@lunny lunny added this to the 1.x.x milestone May 14, 2017
@bkcsoft
Copy link
Member

bkcsoft commented May 14, 2017

enable overall configuration through the webinterface

There's a lot of values that can not be changed during runtime, which is why Gitea doesn't allow for them to be changed in the WebUI.
A few of them listed here:

  • RUN_USER would require a complete restart of the service. And can not be done by Gitea itself.
  • server.HTTP_PORT | HTTP_ADDR | PROTOCOL would require a restart of the http-server. Could be done by Gitea, but would kill any current connections (unless gracefully)
  • server.SSH_PORT would require a restart of the ssh-server. Same as above ☝️
  • database.* would require a complete restart of Gitea. Could be done inside Gitea itself, but I don't see the point in this really.

But the biggest problem is that we don't load partial configs. So Gitea wouldn't know what has been changed, and would therefore require a complete restart done by an outsider (see RUN_USER)

@gayprogrammer
Copy link
Author

gayprogrammer commented May 17, 2017

So currently Gitea can not reinitialize itself? Most software accepts this limitation by including a warning like: "A restart is needed before changes will take effect". Would this be an okay compromise?

There are still good reasons to allow editing in the web interface. For example, settings will be validated before they are written, and settings that depend on other settings can be marked as required.

The core problem of this issue is that the settings I needed did not exist in my config file, nor on the web config page. I needed to piece them together through trial and error until I had a valid config again.

@bkcsoft
Copy link
Member

bkcsoft commented May 19, 2017

did not exist in my config file, [...]. I needed to add them through trial and error until I had a valid config again.

https://github.com/go-gitea/gitea/blob/master/conf/app.ini#L263-L294

With that said, our documentation definitively needs improvement 😂

@A9G-Data-Droid
Copy link

@bkcsoft Your link is now 404. I am a new user who was shocked to find I had to SSH in and modify a text file every time I need to change a setting. I would think that at a minimum there could be a list of simple configs that could be changed without a full restart. For example, I want to change the items in the "Service Configuration" section of the config page. There was no edit button. You already have the settings broken in to sections in the UI. Each of those could have an edit button. This would allow you to add the ability to edit, one section at a time, starting with sections that are easy to implement with no restart required.

@lunny lunny removed this from the 1.x.x milestone Mar 20, 2023
@xgdgsc
Copy link

xgdgsc commented Apr 18, 2023

I would like to use https://github.com/fsnotify/fsnotify to implement the config reloading. Is there a list of configs that can be changed without restart?

@yardenshoham
Copy link
Member

Could we use #18058 for this?
cc @lunny

@lunny
Copy link
Member

lunny commented Apr 18, 2023

Could we use #18058 for this?

cc @lunny

I think yes. We need a PR and migration. But some systemadmin and ansible authors may against it. Maybe we need a Gitea init command to accept an initial configuration file to resolve their problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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

7 participants