-
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
New build toolchain #10908
Comments
This is a work in progress, so please feel free to add to the discussion. |
Really looking forward to this! 👍 As far as globals go, we could create a bundle that just exposes globals via the expose-loader. |
Any update on this? this is a big deal, every time we change |
@c4milo We're still working on this, but there's still a huge effort ahead of us. We can't undo the webpack stuff in production builds until we have a fundamentally new approach in place for how plugins interact with each other, so that hinges heavily on our new platform project. #12501 is tracking the initial effort around a build system in the new platform, if you are interested in the first step in the process. I can't say for certain how this rollout will look, but our expectation now is that once the initial platform lands in the product, webpack will still be a part of production builds, but the optimization time and memory requirements will lessen with every release. The time/memory requirements will continue to diminish until we remove webpack entirely in 7.0. |
@epixa Thanks for the update! is there any workaround we can use when building kibana container images so that bundling and optimization doesn't happen in runtime? We are currently shipping our images with |
@c4milo I'm not familiar with a specific workaround, but I'm curious - if you're using x-pack, why change the enable flag of security at all? |
@epixa we were having a redirect loop with Kibana and were trying to troubleshoot the issue. Runtime bundling and optimization got in the way in our process to narrow down the problem. That said, we are still having issues with Kibana plugins being RED state for some unknown reason. |
Ah, I see. We have had some issues with x-pack security causing infinite redirects when Elasticsearch is inaccessible of the license is no longer valid. They should be fixed in the upcoming 5.6.0 release. I highly recommend seeking help from the forums for unexpected plugin behaviors in general. We reserve github for bug reports and feature requests, so sometimes comments seeking guidance can go unanswered for awhile, whereas people read the forums with the intention of answering questions and helping people troubleshoot every day. |
@mistic Can you break this down to multiple phases and provide rough release date for each phase? |
We're closing in favor of #69706 where we are specifically tracking migrating to Bazel. |
Kibana has grown over the years, but it's been a lot of work to scale to what we have today. A lot of this work was due to the fact we used Webpack as our primary build system and it had to include the code from all plugins within Kibana. These scaling issues were primarily related to the performance (time) and memory required. Now that we have the new platform, that is no longer a blocker.
We also transform all of our Javascript, so I think it's appropriate that we utilize tooling more suited towards compiled languages. I have looked into many tools but the one which stood out was Bazel. Bazel is a proven build tool which has invested a lot of effort into Node/Javascript/Typescript specific rules (bazelbuild/rules_nodejs).
Features of Bazel
With Bazel, we can take advantage of Remote caching. CI would be the only thing which wrote to the cache, but developers would have re-only access to reduce the amount of work needed by their local machine.
I have a small POC which is a work-in-progress here.
One of the idiomatic differences with Bazel than in the current Javascript world is that actions like Typescript transformations and minification are split up. This allow for Bazel to divvy up the work and to improve caching. For example, in Bazel your Typescript code with be transformed, then that transformed code would be the input into your Jest test. Compared that to using the jest-typescript plugin which uses Babel to transform the code used in Jest. The result is less dependencies and a much clearer and debugable code path.
Closes #62266
The text was updated successfully, but these errors were encountered: