-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Setting validation missing during node startup #14777
Comments
cc: @ansjcy |
The validation logic is called if the setting has a validator defined, Now when we init the values for the use case specific setting it first tries to get the value from the internally loaded setting value if not present it returns the default value for the setting
the
I don't think we need to keep this issue open. It is true if the setting does not pass a validator at the setting initialisation time it might try to parse and initialise with the incorrect value(Most of the time it will fail at parsing time). But this can only happen to String key types, and that is why we recommend using Enums and provide the parsers for such settings
I think these cases hints that it is going to be a implementation bug at the client side at best but not the API itself. |
[Triage - attendees 1 2 3 4] - @jainankitk - Thanks for filing the issue. |
Describe the bug
While reviewing another PR, I noticed if we use addSettingsUpdateConsumer with validator, that does not apply to the setting value during node startup. Though I could not find many examples, there are definitely few like the one in ClusterManagerTaskThrottler.
Related component
Cluster Manager
To Reproduce
Expected behavior
Error should be thrown if the setting value in yml file is incorrect
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: