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

Create vendor dll for the client modules #22618

Merged
merged 219 commits into from Dec 5, 2018

Conversation

Projects
None yet
6 participants
@mistic
Member

mistic commented Sep 1, 2018

This PR gives kibana the ability of use webpack dlls for the used node_modules by the client. It has a lot of positive sides including for example the ability to just delete every node_module already bundled into the dll from our final distribution node_modules path (but there are a lot of others).

All the work stages, goals/benefits and results are listed in the following issue #20749. Please take a look in order to get more info.

Additionally this PR also extends the current watch optimizer cache, achieved by #2417 . With this extension the watch optimizer cache invalidation would also be responsible for delete the DLL bundle automatically as soon as it becomes stale.

I wanna thanks to everyone that help me through this journey specially to @spalger, @tylersmalley and ofc my sweet @elastic/kibana-operations team.

mistic added some commits Jul 12, 2018

@elastic elastic deleted a comment from elasticmachine Dec 3, 2018

@elastic elastic deleted a comment from elasticmachine Dec 4, 2018

mistic added some commits Dec 4, 2018

@tylersmalley

This comment was marked as resolved.

Member

tylersmalley commented Dec 4, 2018

I am running into a failure when installing a plugin with a dependency which does not exist in Kibana:

Found previous install attempt. Deleting...
Attempting to transfer from file:///Users/tyler/Downloads/pr-22618/test-0.0.0.zip
Transferring 100483 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation was unsuccessful due to error "Command failed: /Users/tyler/Downloads/pr-22618/kibana-7.0.0-SNAPSHOT-darwin-x86_64/node/bin/node /Users/tyler/Downloads/pr-22618/kibana-7.0.0-SNAPSHOT-darwin-x86_64/src/cli --env.name=production --optimize.useBundleCache=false --server.autoListen=false --plugins.initialize=false

 FATAL  Error: Optimizations failure.
   4783 modules

    ERROR in ./plugins/test/public/app.js
    Module not found: Error: Can't resolve 'udid' in '/Users/tyler/Downloads/pr-22618/kibana-7.0.0-SNAPSHOT-darwin-x86_64/plugins/test/public'

Here is the plugin I built: https://drive.google.com/open?id=1TE30M2YxBGNMC_7WQo6MTDLOLhZ7URj3

@elasticmachine

This comment was marked as outdated.

elasticmachine commented Dec 4, 2018

@tylersmalley

This comment was marked as outdated.

Member

tylersmalley commented Dec 4, 2018

I fat fingered that - retesting.

@tylersmalley

This comment has been minimized.

Member

tylersmalley commented Dec 4, 2018

Verified plugin install containing a dependency not in Kibana.

Install time went from 276s to 161s, a 41.6% reduction. 👏

@mistic

This comment has been minimized.

Member

mistic commented Dec 4, 2018

oh yeah! @tylersmalley do you think we are good to go?

@elastic elastic deleted a comment from elasticmachine Dec 4, 2018

@spalger

spalger approved these changes Dec 4, 2018

Just pulled and tried it out, LGTM!

mistic added some commits Dec 4, 2018

@elasticmachine

This comment was marked as outdated.

elasticmachine commented Dec 4, 2018

@elasticmachine

This comment was marked as off-topic.

elasticmachine commented Dec 4, 2018

@elasticmachine

This comment was marked as outdated.

elasticmachine commented Dec 4, 2018

@elasticmachine

This comment was marked as outdated.

elasticmachine commented Dec 5, 2018

@elasticmachine

This comment has been minimized.

elasticmachine commented Dec 5, 2018

@mistic mistic merged commit d5b2c8e into elastic:master Dec 5, 2018

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
kibana-ci Build finished.
Details

mistic added a commit that referenced this pull request Dec 5, 2018

[6.x] Create vendor dll for the client modules (#22618) (#26707)
* chore(NA): merge and solve conflicts with 6.x when backporting.

* chore(NA): updated kbn pm file.
@mistic

This comment has been minimized.

Member

mistic commented Dec 5, 2018

6.x: 42102ba

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