-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Refactor json parsing in immutable handlers #88492
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@@ -284,18 +284,4 @@ static int capacity(int expectedSize) { | |||
return expectedSize < 2 ? expectedSize + 1 : (int) (expectedSize / 0.75 + 1.0); | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed anymore with the way I do parsing. This method was added previously by me.
@@ -0,0 +1,8 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this file because we need it to expose the service provider when we load them in the future using PluginsService createExtension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The current immutable handlers assume json input, which is inefficient for use by plugins and modules. This PR refactors the xcontent parsing in a separate method to be used only when we actually have json input (file based settings).
This way the immutable state controller can work with POJOs and xcontent too.
This PR is split off from #88224 to reduce the PR size.