bramble icon indicating copy to clipboard operation
bramble copied to clipboard

Plugin` configuration doesnt depend on config changes

Open ITheCorgi opened this issue 2 years ago • 3 comments

Once plugin configuration was changed in bramble.json file, file watcher handles event and reload config in case of CREATE or CHANGE. But, for example auth plugin doesn`t depend on this reload process, as this object is constructed at the moment of starting Bramble (i tried to change Role section, bramble triggered event changes, but auth plugin was working under old role model)

ITheCorgi avatar Oct 24 '22 15:10 ITheCorgi

I re-checked the process of auth plugin hot reload and figured out that the issue is during unmarshalling data json.RawMessage in case role was removed from Roles config image

Suggest clearing a plugin` config at the start of configuring (commented line)

ITheCorgi avatar Oct 25 '22 09:10 ITheCorgi

Thanks for spotting the bug @ITheCorgi, would you like to make a PR of the change?

pkqk avatar Nov 07 '22 02:11 pkqk

@pkqk Yeah, sure

ITheCorgi avatar Nov 10 '22 10:11 ITheCorgi