bench icon indicating copy to clipboard operation
bench copied to clipboard

feat: Inform user of change in configuration files

Open anirudhdggl opened this issue 3 years ago • 4 comments

What type of a PR is this?

  • [ ] Changes to Existing Features
  • [x] New Feature Submissions
  • [ ] Bug Fix
  • [ ] Breaking Change (include change in API behaviours, etc.)

Explanation

Whenever there is a change in any config file in a bench, within the config directory, the user has to ensure that he restarts the bench. If at any time user forgets to restart the relevant bench, a warning will be presented to him on the CLI stating that he needs to restart the bench in order for the configuration changes to take effect


Screenshots

image image image

closes: #1035

anirudhdggl avatar Dec 20 '21 18:12 anirudhdggl

Added a fix as well - for existing bench, where the config log filedo not exist. Initially this would've caused an error but now we would prompt the user to run bench restart command.

Bench restart would then go and create the config log file and from next time onwards whenever a change is made to any config file, there would be a message prompting users to restart bench

image

anirudhdggl avatar Dec 21 '21 13:12 anirudhdggl

hey @anirudhdggl, thanks for your contribution. This is certainly going to be useful to remind users to reload their bench's processes. Although, one bit does come up that any command that updates config files also restarts the processes by default. This is a good-to-have but we could better move this elsewhere and not trigger it every time someone uses the CLI.


However, this doesn't resolve the mentioned issue. Issue #1035 is about telling users that they should reset their config files because we've made changes in them - this could be adding performance, security, or bug fixes. ie, whenever changes are made in the template files (ref:nginx config template), and an end-user updates their bench package, there should be a mechanism in place that finds and resolves outdated configs.

gavindsouza avatar Jan 05 '22 11:01 gavindsouza

Okay - so basically #1035 is that whenever any file is changed in this directory in GitHub, this exact location, we should ask the users to make the relevant changes to their local configs? Am I understanding it correctly?

And is this just for the .conf files or all the files (even within the subdirectory) in this directory?

anirudhdggl avatar Jan 05 '22 17:01 anirudhdggl

Okay - so basically #1035 is that whenever any file is changed in this directory in GitHub, this exact location, we should ask the users to make the relevant changes to their local configs? Am I understanding it correctly?

Yes! Nicely put, thanks.

And is this just for the .conf files or all the files (even within the subdirectory) in this directory?

This, I didn't fully follow.


@anirudhdggl Hope this thread didn't die out. I've been caught up with other things, apologies 🥲

gavindsouza avatar Feb 16 '22 07:02 gavindsouza