-
Notifications
You must be signed in to change notification settings - Fork 63
feat: enable configuration hot-reloading #231
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
Conversation
|
mm let's check with @blevkivskyi-everstake what would be his preferred use case but this feels a bit overly complicated to me? why not just have a watcher to the file (eg with notify) and trigger a config update when it's modified? |
|
I'm not sure if it will work correctly with container environments. |
|
I would say that if the reload fails, then the config is not updated. At startup it would fail ofc which is the normal behaviour |
I thought that instant updates can cause some problems, as you might save the file several times before having a desirable version? Having an endpoint instead gives you control over when the config is updated.
That is correct. If the reload fails (i.e. some config is wrong), the config is not updated and the request returns a 500 error.
Just to clarify, do you want to hot-reload the server when |
Yes. |
|
The current implementation should work then, using the |
|
Yes, reloading all included files is required. |
ltitanb
left a comment
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.
Looks great overall! Some smaller changes/suggestions

Added hot-reloading for configuration in PBS and signer modules. This expose a
/reloadendpoint on each module that re-parse the configuration file and apply the changes to their config/manager structures.Changes to listening hosts and ports will not be applied as they require the server to restart. Also, path-related changes may not work if the module is running in Docker, as they require the container to be recreated.
Close #219