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

Remove legacy optimizer #73154

Merged
merged 34 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8fbc20b
Remove legacy optimizer
spalger Aug 5, 2020
682f944
update test fixutre
spalger Aug 5, 2020
f1cbff2
restore kbn/pm dist checking and update dist
spalger Aug 5, 2020
a3abe9f
update deprecation tests to be more comprehensive
spalger Aug 5, 2020
63ea215
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 5, 2020
5073e32
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 6, 2020
6c8acb9
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 6, 2020
109e474
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 10, 2020
f618833
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 10, 2020
0442364
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 10, 2020
09ecffa
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 11, 2020
93b97d6
rebuild kbn/pm dist
spalger Aug 11, 2020
28a232d
[src/cli] the server log isn't usable until started, just exit
spalger Aug 11, 2020
3725f17
expand --help for --optimize
spalger Aug 11, 2020
a5e7186
remove remaining mentions of webpackShims
spalger Aug 11, 2020
751c305
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 11, 2020
ac3d89b
remove one more unused webpackShim
spalger Aug 11, 2020
0f346f3
remove uiExports module references and fix some eslint issues
spalger Aug 11, 2020
d04bcbd
remove tests for unused functionality
spalger Aug 11, 2020
30ae99f
remove styleSheetToCompile usage from plugin-helpers
spalger Aug 11, 2020
d39ddbf
update yarn.lock
spalger Aug 11, 2020
b2a2d1c
remove invalid/unused imports
spalger Aug 11, 2020
be318f1
always attempt to use node resolution before webpack resolution
spalger Aug 11, 2020
4fd4301
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 11, 2020
054913c
revert change to max worker count
spalger Aug 11, 2020
b41d99f
Merge branch 'master' into remove/legacy-optimizer
elasticmachine Aug 12, 2020
dac0a5f
Merge branch 'master' into remove/legacy-optimizer
elasticmachine Aug 12, 2020
d2332b2
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 12, 2020
43b2fad
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 12, 2020
9f46cd1
apply some feedback
spalger Aug 13, 2020
5adf934
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 13, 2020
2f19db6
remove legacy snapshots from rendering service
spalger Aug 13, 2020
86b2a4d
remove unused variable
spalger Aug 13, 2020
f29489d
Merge branch 'master' of github.com:elastic/kibana into remove/legacy…
spalger Aug 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 2 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ target

# plugin overrides
/src/core/lib/kbn_internal_native_observable
/src/legacy/core_plugins/console/public/tests/webpackShims
/src/legacy/core_plugins/console/public/webpackShims
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
/src/legacy/ui/public/flot-charts
/src/legacy/ui/public/utils/decode_geo_hash.js
spalger marked this conversation as resolved.
Show resolved Hide resolved
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/src/plugins/timelion/public/webpackShims/jquery.flot.*
/src/plugins/vis_type_timelion/public/flot/jquery.flot.*
/src/plugins/timelion/public/flot/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
Expand Down
6 changes: 2 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ module.exports = {
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['ui/**/*', 'uiExports/**/*'],
from: ['ui/**/*'],
errorMessage: 'Plugins cannot import legacy UI code.',
},
{
Expand Down Expand Up @@ -457,14 +457,13 @@ module.exports = {
{
files: [
'**/public/**/*.js',
'**/webpackShims/**/*.js',
'packages/kbn-ui-framework/doc_site/src/**/*.js',
'src/fixtures/**/*.js', // TODO: this directory needs to be more obviously "public" (or go away)
],
settings: {
// instructs import/no-extraneous-dependencies to treat certain modules
// as core modules, even if they aren't listed in package.json
'import/core-modules': ['plugins', 'legacy/ui', 'uiExports'],
'import/core-modules': ['plugins', 'legacy/ui'],

'import/resolver': {
'@kbn/eslint-import-resolver-kibana': {
Expand Down Expand Up @@ -605,7 +604,6 @@ module.exports = {
{
files: [
'.eslintrc.js',
'**/webpackShims/**/*.js',
'packages/kbn-plugin-generator/**/*.js',
'packages/kbn-eslint-import-resolver-kibana/**/*.js',
'packages/kbn-eslint-plugin-eslint/**/*',
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ out an open PR:

- [CONTRIBUTING.md](CONTRIBUTING.md) will help you get Kibana up and running.
- If you would like to contribute code, please follow our [STYLEGUIDE.md](STYLEGUIDE.md).
- Learn more about our UI code with [UI_SYSTEMS.md](src/legacy/ui/public/UI_SYSTEMS.md).
tylersmalley marked this conversation as resolved.
Show resolved Hide resolved
- For all other questions, check out the [FAQ.md](FAQ.md) and
[wiki](https://github.com/elastic/kibana/wiki).

Expand Down
2 changes: 1 addition & 1 deletion STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ Do not use setters, they cause more problems than they can solve.
When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss).
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss).
While the styles for this component will only be loaded if the component exists on the page,
the styles **will** be global and so it is recommended to use a three letter prefix on your
Expand Down
6 changes: 0 additions & 6 deletions docs/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,6 @@ locations for a Debian-based system:
| /var/log/kibana
| path.logs

| optimize
| Transpiled source code. Certain administrative actions (e.g. plugin install)
result in the source code being retranspiled on the fly.
| /var/lib/kibana/optimize
d|

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
| /usr/share/kibana/plugins
Expand Down
6 changes: 0 additions & 6 deletions docs/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@ locations for an RPM-based system:
| /var/log/kibana
| path.logs

| optimize
| Transpiled source code. Certain administrative actions (e.g. plugin install)
result in the source code being retranspiled on the fly.
| /var/lib/kibana/optimize
d|

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
| /usr/share/kibana/plugins
Expand Down
6 changes: 0 additions & 6 deletions docs/setup/install/targz.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ important data later on.
| $KIBANA_HOME\data
d|

| optimize
| Transpiled source code. Certain administrative actions (e.g. plugin install)
result in the source code being retranspiled on the fly.
| $KIBANA_HOME\data\optimize
d|

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
| $KIBANA_HOME\plugins
Expand Down
6 changes: 0 additions & 6 deletions docs/setup/install/windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ important data later on.
| $KIBANA_HOME\data
d|

| optimize
| Transpiled source code. Certain administrative actions (e.g. plugin install)
result in the source code being retranspiled on the fly.
| $KIBANA_HOME\data\optimize
d|

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
| $KIBANA_HOME\plugins
Expand Down
24 changes: 0 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
},
"dependencies": {
"@babel/core": "^7.11.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we still using babel in production? I thought we pre-babel'd everything during the build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still babel-register, but I plan to remove that soon, once the plugin-helpers take care of babel-ifying things at build time.

"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/register": "^7.10.5",
"@elastic/apm-rum": "^5.4.0",
"@elastic/charts": "19.8.1",
Expand Down Expand Up @@ -154,20 +153,16 @@
"angular-route": "^1.8.0",
"angular-sanitize": "^1.8.0",
"angular-sortable-view": "^0.0.17",
"autoprefixer": "^9.7.4",
"babel-loader": "^8.0.6",
"bluebird": "3.5.5",
"boom": "^7.2.0",
"brace": "0.11.1",
"cache-loader": "^4.1.0",
"chalk": "^2.4.2",
"check-disk-space": "^2.1.0",
"chokidar": "3.2.1",
"color": "1.0.3",
"commander": "3.0.2",
"compare-versions": "3.5.1",
"core-js": "^3.6.4",
"css-loader": "^3.4.2",
"d3": "3.5.17",
"d3-cloud": "1.2.5",
"deep-freeze-strict": "^1.1.1",
Expand All @@ -179,7 +174,6 @@
"execa": "^4.0.2",
"expiry-js": "0.1.7",
"fast-deep-equal": "^3.1.1",
"file-loader": "4.2.0",
"font-awesome": "4.7.0",
"fp-ts": "^2.3.1",
"getos": "^3.1.0",
Expand Down Expand Up @@ -211,11 +205,9 @@
"leaflet-vega": "^0.8.6",
"leaflet.heat": "0.2.0",
"less": "npm:@elastic/less@2.7.3-kibana",
"less-loader": "5.0.0",
"lodash": "^4.17.15",
"lru-cache": "4.1.5",
"markdown-it": "^10.0.0",
"mini-css-extract-plugin": "0.8.0",
"minimatch": "^3.0.4",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
Expand All @@ -227,12 +219,9 @@
"opn": "^5.5.0",
"oppsy": "^2.0.0",
"pegjs": "0.10.0",
"postcss-loader": "^3.0.0",
"prop-types": "15.6.0",
"proxy-from-env": "1.0.0",
"pug": "^2.0.4",
spalger marked this conversation as resolved.
Show resolved Hide resolved
"query-string": "5.1.1",
"raw-loader": "3.1.0",
"re2": "^1.15.4",
"react": "^16.12.0",
"react-color": "^2.13.8",
Expand All @@ -258,33 +247,24 @@
"resize-observer-polyfill": "^1.5.0",
"rison-node": "1.0.2",
"rxjs": "^6.5.5",
"script-loader": "0.7.2",
"seedrandom": "^3.0.5",
"semver": "^5.5.0",
"style-it": "^2.1.3",
"style-loader": "^1.1.3",
"symbol-observable": "^1.2.0",
"tar": "4.4.13",
"terser-webpack-plugin": "^2.3.4",
"thread-loader": "^2.1.3",
"tinygradient": "0.4.3",
"tinymath": "1.2.1",
"topojson-client": "3.0.0",
"tslib": "^2.0.0",
"type-detect": "^4.0.8",
"ui-select": "0.19.8",
"url-loader": "2.2.0",
"uuid": "3.3.2",
"val-loader": "^1.1.1",
"vega": "^5.13.0",
"vega-lite": "^4.13.1",
"vega-schema-url-parser": "^1.1.0",
"vega-tooltip": "^0.12.0",
"vision": "^5.3.3",
"webpack": "^4.41.5",
"webpack-merge": "4.2.2",
"whatwg-fetch": "^3.0.0",
"wrapper-webpack-plugin": "^2.1.0",
"yauzl": "2.10.0"
},
"devDependencies": {
Expand Down Expand Up @@ -450,8 +430,6 @@
"has-ansi": "^3.0.0",
"iedriver": "^3.14.2",
"intl-messageformat-parser": "^1.4.0",
"is-path-inside": "^2.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"jest": "^25.5.4",
"jest-canvas-mock": "^2.2.0",
"jest-circus": "^25.5.4",
Expand All @@ -472,14 +450,12 @@
"murmurhash3js": "3.0.1",
"mutation-observer": "^1.0.3",
"nock": "12.0.3",
"node-sass": "^4.13.1",
"normalize-path": "^3.0.0",
"nyc": "^15.0.1",
"pixelmatch": "^5.1.0",
"pkg-up": "^2.0.0",
"pngjs": "^3.4.0",
"postcss": "^7.0.32",
"postcss-url": "^8.0.0",
"prettier": "^2.0.5",
"proxyquire": "1.8.0",
"react-popper-tooltip": "^2.10.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^2.3.0"
"eslint-plugin-react-hooks": "^4.0.4"
}
}
4 changes: 3 additions & 1 deletion packages/kbn-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"babel-plugin-filter-imports": "^3.0.0",
"babel-plugin-styled-components": "^1.10.7",
"babel-plugin-transform-define": "^1.3.1",
"babel-plugin-transform-imports": "^2.0.0"
"babel-plugin-transform-imports": "^2.0.0",
"react-is": "^16.8.0",
"styled-components": "^5.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const {
getProjectRoot,
getWebpackConfig,
isFile,
isProbablyWebpackShim,
getIsPathRequest,
resolveWebpackAlias,
} = require('./lib');
Expand Down Expand Up @@ -73,15 +72,6 @@ exports.resolve = function resolveKibanaPath(importRequest, file, config) {
return tryNodeResolver(importRequest, file, config);
}

// these modules are simulated by webpack, so there is no
// path to resolve to and no reason to do any more work
if (importRequest.startsWith('uiExports/')) {
return {
found: true,
path: null,
};
}

const { webpackConfig, aliasEntries } = initContext(file, config);
let isPathRequest = getIsPathRequest(importRequest);

Expand Down Expand Up @@ -110,16 +100,9 @@ exports.resolve = function resolveKibanaPath(importRequest, file, config) {
}
}

// only use the node resolver if the importRequest is a path, or is
// a module request but not one that's probably a webpackShim. This
// prevents false positives as webpackShims are likely to be resolved
// to the node_modules directory by the node resolver, but we want
// them to resolve to the actual shim
if (isPathRequest || !isProbablyWebpackShim(importRequest, file)) {
const nodeResult = tryNodeResolver(importRequest, file, config);
if (nodeResult && nodeResult.found) {
return nodeResult;
}
const nodeResult = tryNodeResolver(importRequest, file, config);
if (nodeResult && nodeResult.found) {
return nodeResult;
}

return webpackResolver.resolve(importRequest, file, {
Expand Down
66 changes: 0 additions & 66 deletions packages/kbn-eslint-import-resolver-kibana/lib/get_plugins.js

This file was deleted.

Loading