-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove the optimizer from builds #7322
Comments
/cc @tylersmalley |
Would love to have that. |
I removed the breaking label because this isn't necessarily a breaking change. |
Once this is done, we can just close #5071 if that's still open. |
Will this also fix #19678 ? |
I have some updates on this matter. Over the past days I spent some time investigating ways to kill/drastically reduce the use of optimizer on Kibana. I have also spent some time in a POC you can found here mistic/webpack-dll-spike-app. Removing the optimizer at this stage, if possible, will be very difficult as we in the current architecture we hardly rely on it. However I (and other folks on the @elastic/kibana-operations ) believe that could be possible to follow another path, that instead of remove the optimizer will help us to drastically reduce the use of it and move us in a step further into the goal of removing it! The main ideas behind this possible solution rely on the webpack DLL (I will narrow the description to a 1st Step - Kibana Side - Building Kibana
2nd Step - Plugin Side - Building a Plugin
3rd Step - Kibana Side - Importing a Plugin
We believe that this could be a possible solution for the problem, and it will also allow us moving in the direction of being able to remove the optimizer from production. You can found some of the concepts in the above mentioned POC. As the first step we decide trying to implement a vendors dll, only for the client side, and then re-evaluate! A new issue #20749 was created to accomplish it. |
Remaining plugins that still rely on the optimizer in production:
We also have the "tests_bundle" plugin which is used for building a bundle of tests to be executed inside a real browser using Karma. I believe we should be able to remove the optimizer from production builds before we have a replacement mechanism for this. However, it may be simpler to migrate all of this first and just completely remove the legacy optimizer rather than attempting to have special prod-only behavior. Virtually all the remaining Karma tests are in the |
Just to leave this in written state here: We're working on migrating the Karma tests really soon all over to other test frameworks. If there are still remaining tests left after 7.10, we're fine disabling/removing them until we can migrate them to a different test framework. |
The optimizer runs in kibana releases whenever you install a plugin and whenever you start kibana after removing a plugin. This shouldn't be necessary or even possible.
The bundles that get created at build time and shipped with the core release should be immutable, and all plugins should need to create their own bundles during their own build process. Kibana should not in any way attempt to wrangle the actual plugin code itself, and plugins should not in any way be concerned with Kibana doing so.
This should mean that the optimizer does not get shipped with builds and is only used in development. That will greatly speed up plugin install/removal, will improve reliability of plugin installs and the integrity of the core kibana build, remove the need for certain permission wrangling that occurs now for package installs, and will allow us to ship Kibana with defaults for low max memory usage.
This should also free us to explore changes to the entire dev build system to make it faster and easier to use since we won't be burdened by production requirements of the optimizer. Ultimately, it will allow us to treat our tooling around the dev process as simply a part of the project rather than as part of the product itself.
Blockers:
Tasks:
src/optimizer
and related dependenciesCloses #19633
Closes #19678
Related to #57406
The text was updated successfully, but these errors were encountered: