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

Exclude classes watcher config update is not working via POST watchers actuator endpoint #394

Open
bunty-raghani opened this issue Sep 11, 2023 · 2 comments

Comments

@bunty-raghani
Copy link

In case of POST watchers actuator endpoint, when we specify any classes that needs to be excluded, in that case, those classes are not getting updated in watchers config. In this case, POST request will be completed successfully with 200 OK response but when you verify the watchers config using GET watchers endpoint, exclude classes array will appear as empty.

NOTE: Exclude classes functionality is working fine when we specify the same via application.properties
chaos.monkey.watcher.exclude-classes=com.example.chaos.monkey.service.UsersService

Expected Behavior

In case of POST watchers actuator endpoint, when we specify any class/classes that needs to be excluded then the watcher config should be updated correctly with specified set of classes.

Current Behavior

Exclude classes config is not getting updated. Exclude classes will always appear as empty in case of GET watchers endpoint.

Steps to Reproduce

  1. Specify a single class/set of classes that needs to be excluded in case of POST watchers endpoint
    "excludeClasses": ["com.example.chaos.monkey.service.UsersService"]
  2. POST request will be completed with 200 ok response.
  3. Hit GET watchers actuator endpoint, excludeClasses will appear as empty.

Context (Environment)

It will be helpful if we can directly update the exclude classes via actuator endpoint instead of specifying the same in application.properties and restarting the app each and every time.

@F43nd1r
Copy link
Member

F43nd1r commented Sep 29, 2023

Configuring excludeClasses via endpoint is not implemented atm. The endpoint just ignores the unknown property

@F43nd1r
Copy link
Member

F43nd1r commented Sep 29, 2023

The excludeClasses field is only evaluated at bean creation, making this dynamically configurable might lead to confusion

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

No branches or pull requests

2 participants