Skip to content
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

Improve dll plugin relation with webpackshims #30129

Merged

Conversation

mistic
Copy link
Member

@mistic mistic commented Feb 5, 2019

This PR has some important improvements over the interaction between the dll plugin and our development environment specially with webpackShims.

The main changes are:

  • remove specific watch for x-pack webpackShims folder
  • move ui related actions inside webpackShims to proper ui related files
  • remove xpack security plugin angular-ui-select webpackShim
  • remove manual searching for webpackShim imports into the dll plugin
  • explicit avoid max dll compilations in all environments for the dll plugin
  • explicit throw an error and list all the not allowed modules bundled into the dll bundle
  • bump ui-select version on x-pack to match the one used on oss kibana
  • enable x-pack jest tests module name mapper for ^plugins/xpack_main/(.*)
  • explicit require ui dependencies on kibana legay core_module

As a result of this PR we will fix a current problem we are having on master since dll is bundling not allowed modules at the moment.

/cc @elastic/kibana-security: I've removed the webpackShims under the x-pack/plugins/security as it was the same we already have under kibana/webpackShims

/cc @elastic/ml-ui: I've only replaced the import 'ui-bootstrap'; by the new equivalent one import 'ui/bootstrap';

@mistic mistic requested a review from spalger February 5, 2019 19:57
@mistic mistic requested review from a team as code owners February 5, 2019 19:57
@mistic mistic self-assigned this Feb 5, 2019
@elasticmachine

This comment has been minimized.

@mistic mistic changed the title [WIP] Improve dll plugin relation with webpackshims Improve dll plugin relation with webpackshims Feb 5, 2019
@mistic mistic added review Team:Operations Team label for Operations Team labels Feb 5, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from a security perspective

@elasticmachine

This comment has been minimized.

src/legacy/core_plugins/kibana/public/kibana.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dll_compiler.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dynamic_dll_plugin.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dynamic_dll_plugin.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dynamic_dll_plugin.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dynamic_dll_plugin.js Outdated Show resolved Hide resolved
src/optimize/dynamic_dll_plugin/dynamic_dll_plugin.js Outdated Show resolved Hide resolved
src/ui/public/tooltip/tooltip.js Outdated Show resolved Hide resolved
@elasticmachine

This comment has been minimized.

@mistic

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@spalger
Copy link
Contributor

spalger commented Feb 14, 2019

Sorry, my changes in #30765 are an example of a file from the src directory that we actually want to whitelist in the DLL

@mistic
Copy link
Member Author

mistic commented Feb 14, 2019

Yeah will take care of it!

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mistic mistic merged commit 514673c into elastic:master Feb 22, 2019
@mistic
Copy link
Member Author

mistic commented Feb 22, 2019

7.x: 963b26b

mistic added a commit to mistic/kibana that referenced this pull request Feb 22, 2019
* chore(NA): remove specific watch for x-pack webpackShims folder.

* chore(NA): remove xpack security plugin angular-ui-select webpackShim.

* chore(NA): bump ui-select version on x-pack to match the one used on oss kibana

* chore(NA): remove manual searching for webpackShim imports into the dll plugin. chore(NA): explicit avoid max dll compilations in all environments for the dll plugin. chore(NA): explicit throw an error and list all the not allowed modules bundled into the dll bundle.

* refact(NA): move ui related actions inside webpackShims to proper ui related files

* chore(NA): move angular ui dependencies from webpackShims to kibana core module.

* test(NA): enable xpack jest tests to be able to resolve plugins/xpack_main/*. refact(NA): rewrite code for the old xpack jquery flot webpackShim.

* refact(NA): use the already declared ui module get to list the dependencies for the kibana legacy core plugin.

* chore(NA): move angular ui requires to a better centralized place.

* refact(NA): rename areMaxCompilationsPerformed to assertMaxCompilations.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): apply changes according pr review.

* refact(NA): change from requires to imports in xpack_main plugin jquery flots.

* refact(NA): jquery flots missing statements.

* fix(na): linting problems.

* chore(na): re add jquery flot requires instead of imports.

* refact(NA): moving jquery flots from require to import. test(NA): fix mock for jquery_flot.

* feat(na): allow dynamic dll plugin public modules on dll bundle.

* feat(NA): step verification to not allow modules from xpack source.

* chore(NA): fix linting problems.
mistic added a commit that referenced this pull request Feb 22, 2019
* chore(NA): remove specific watch for x-pack webpackShims folder.

* chore(NA): remove xpack security plugin angular-ui-select webpackShim.

* chore(NA): bump ui-select version on x-pack to match the one used on oss kibana

* chore(NA): remove manual searching for webpackShim imports into the dll plugin. chore(NA): explicit avoid max dll compilations in all environments for the dll plugin. chore(NA): explicit throw an error and list all the not allowed modules bundled into the dll bundle.

* refact(NA): move ui related actions inside webpackShims to proper ui related files

* chore(NA): move angular ui dependencies from webpackShims to kibana core module.

* test(NA): enable xpack jest tests to be able to resolve plugins/xpack_main/*. refact(NA): rewrite code for the old xpack jquery flot webpackShim.

* refact(NA): use the already declared ui module get to list the dependencies for the kibana legacy core plugin.

* chore(NA): move angular ui requires to a better centralized place.

* refact(NA): rename areMaxCompilationsPerformed to assertMaxCompilations.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): apply changes according pr review.

* refact(NA): change from requires to imports in xpack_main plugin jquery flots.

* refact(NA): jquery flots missing statements.

* fix(na): linting problems.

* chore(na): re add jquery flot requires instead of imports.

* refact(NA): moving jquery flots from require to import. test(NA): fix mock for jquery_flot.

* feat(na): allow dynamic dll plugin public modules on dll bundle.

* feat(NA): step verification to not allow modules from xpack source.

* chore(NA): fix linting problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Operations Team label for Operations Team v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants