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

Plugin` configuration doesnt depend on config changes #176

Open
ITheCorgi opened this issue Oct 24, 2022 · 3 comments
Open

Plugin` configuration doesnt depend on config changes #176

ITheCorgi opened this issue Oct 24, 2022 · 3 comments

Comments

@ITheCorgi
Copy link

ITheCorgi commented Oct 24, 2022

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 ITheCorgi changed the title Plugin configuration doesnt depend on config changes Plugin` configuration doesnt depend on config changes Oct 24, 2022
@ITheCorgi
Copy link
Author

ITheCorgi commented Oct 25, 2022

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)

@pkqk
Copy link
Member

pkqk commented Nov 7, 2022

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

@ITheCorgi
Copy link
Author

@pkqk Yeah, sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants