Commit graph

25 commits

Author SHA1 Message Date
Spencer
7df868b300
Revert/7.7/optimizer workers changes (#67245)
* Revert "[7.7] [kbn/optimizer] remove disconnect listener (#67161) (#67185)"

This reverts commit a1c7cf1aa6.

* Revert "[7.7] [kbn/optimizer] poll parent process to avoid zombie processes (#67059) (#67119)"

This reverts commit e6a5a9d31b.

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-23 12:45:29 -07:00
restrry
846ff4ace1 update styles 2020-05-22 11:46:32 +02:00
Spencer
a1c7cf1aa6
[7.7] [kbn/optimizer] remove disconnect listener (#67161) (#67185) 2020-05-21 11:58:50 -07:00
Spencer
bd5f65dc6f
[7.7] [kbn/optimizer] ensure build script can prime cache (#67020) (#67191) 2020-05-21 11:48:46 -07:00
Spencer
2863d4feca
[7.7] [kbn/optimizer] require fsevents on macos (#67147) (#67160) 2020-05-21 11:33:57 -07:00
Spencer
e6a5a9d31b
[7.7] [kbn/optimizer] poll parent process to avoid zombie processes (#67059) (#67119) 2020-05-20 10:31:47 -07:00
Spencer
c5f682cbbc
[7.7] Implement basic CI metric reporting (#64263) (#64581) 2020-04-27 16:28:30 -07:00
Tiago Costa
5746c66597
fix(NA): node module main field resolution for new platform (#63886) (#64304)
* fix(NA): node module main field resolution for new platform

* chore(NA): remove browserify from kbn optimizer main fields

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-24 02:28:34 +01:00
Spencer
3fb7bf31aa
[7.7] [kbn/optimizer] link to kibanaReact/kibanaUtils plugins… (#63011)
* [kbn/optimizer] link to data/kibanaReact/kibanaUtils plugins

* depend on normalize-path package

* typos

* avoid loading kibanaUtils and kibanaReact from urls

* update types and tests, now that whole plugin is exported to window

* update snapshot, removed export of `plugins` property

* fix condition, ignore things NOT in data/react/utils

* make es_ui_shared a "static bundle" too

* move kibana_utils/common usage to /public

* convert some more /common usage to /public

* use async-download/ordered-execution for bootstrap script

* fix typo

* remove kibanaUtils bundle

* remove kibanaReact bundle

* Revert "remove kibanaReact bundle"

This reverts commit f14e9ee604.

* Revert "remove kibanaUtils bundle"

This reverts commit a64b2a7f64.

* stop linking to the data plugin

* add comment pointing to async-download info

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
#	src/legacy/core_plugins/vis_type_metric/public/services.ts
#	src/legacy/core_plugins/vis_type_table/public/services.ts
#	src/legacy/core_plugins/vis_type_vislib/public/services.ts
#	src/legacy/core_plugins/visualizations/public/np_ready/public/legacy.ts
2020-04-08 14:27:25 -07:00
Spencer
baf3e059c5
[7.7] [kbn/ui-shared-deps] expand and split (#62364) (#62523)
* [kbn/ui-shared-deps] expand and split (#62364)

* [kbn/ui-shared-deps] expand and split

* add two import styles for eui/react-dom that are new

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* downgrade elasticsearch-browser and updated yarn.lock

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-04 22:56:12 -07:00
Spencer
7321d5e0f1
[7.7] [optimizer] validate the syntax of bundled node_modules… (#61905)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	renovate.json5

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 20:16:31 -07:00
patrykkopycinski
9d5582bcc4
Revert "[7.x][SIEM] apollo@3 (#51926)" (#59637)
* Revert "[SIEM] apollo@3 (#51926)"

* cleanup
2020-03-09 12:17:25 -07:00
Spencer
605fb2af42
[7.x] [kbn/optimizer] add test to verify that dynamic imports… (#59154)
* [kbn/optimizer] add test to verify that dynamic imports keep working

* sort files before adding to cache

* oops, committed tmp repo
2020-03-03 11:42:32 -07:00
Spencer
1254203adf
[7.x] [kbn/optimizer] fix ui/* url rewrites in dist (#58627) (#59093)
* [kbn/optimizer] fix ui/* url rewrites in dist

* add tests to verify styles are built correctly and ui-rewrites are happening

* clarify change to dirs creation

* create tested & shared parsePath helper

* update renovate config

* split implementation of parsePath for dir and file paths

* switch to valid css property

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 17:18:31 -07:00
patrykkopycinski
d2fcec4fa6
[SIEM] apollo@3 (#51926) (#58699) 2020-02-27 11:36:47 +01:00
Spencer
a2a0358270
[7.x] Fix flaky jest test (#58402) (#58534)
* Revert "Temporarily removes kbn-optimizer cache key tests (#58318)"

This reverts commit e64eff0a3d.

* [kbn-optmizer] avoid mocking fs exports

* overwrite ciGroup script to support jest in flaky testing job

* limit jest workers to 3 so that concurrent runners have space to operate

* Revert "limit jest workers to 3 so that concurrent runners have space to operate"

This reverts commit 1a2f882f6d.

* Revert "overwrite ciGroup script to support jest in flaky testing job"

This reverts commit 548db61722.
2020-02-26 18:47:53 -07:00
Tyler Smalley
46da04cb35 Temporarily removes kbn-optimizer cache key tests (#58318)
While we investigate why they are interfering with other tests.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit e64eff0a3d)
2020-02-24 19:56:03 -07:00
Spencer
ce10569331
[kbn/optimizer] disable parallelization in terser plugin (#58396) (#58421)
* [kbn/optimizer] disable parallelization in terer plugin

* use more workers when building the dist

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-24 18:45:15 -07:00
Spencer
8c5498c510
[kbn/optimizer] include bootstrap cache key in optimizer cache key (#58176) (#58237)
* [kbn/optimizer] include bootstrap cache key in optimizer cache key

* remove cache buster

* update cache keys tests

* move mocks

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-24 11:28:02 -07:00
Spencer
23e3ce78f7
[7.x] add monaco to kbn/ui-shared-deps and load required features for all uses (#58075) (#58167)
* add monaco to kbn/ui-shared-deps and load required features for all uses (#58075)

* add monaco to kbn/ui-shared-deps and load required features for all uses

* forgot to save a change

* remove unused imports

* include a cache buster to counteract issue #58077

* include monaco.ts in ts project

* update yarn.lock
2020-02-20 16:51:12 -07:00
Spencer
89f24ad30e
[kbn/optimizer] emit success event from reducer when all bundles cached (#57945) (#58042)
* emit success event from reducer when all bundles cached

* verify that infinite streams can be broken by unsubscribing

* shift naming a smidge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-19 15:08:56 -07:00
Spencer
df56d06974
[@kbn/optimizer] prevent error when all bundles are cached (#57871) (#57891) 2020-02-19 05:12:22 -07:00
Spencer
bff96ab517
[@kbn/optimizer] rewrite url(ui/*) in legacy scss files (#57869) (#57901)
* [@kbn/optimizer] rewrite url(ui/*) in legacy scss files

* update kbn/pm dist
2020-02-19 05:09:12 -07:00
Spencer
246d7da11d
[7.x] [kbn/optimizer] throw errors into stream on invalid comp… (#57738) 2020-02-14 18:48:24 -07:00
Spencer
9f94c39960
[7.x] build immutable bundles for new platform plugins (#53976) (#57528)
* build immutable bundles for new platform plugins (#53976)

* build immutable bundles for new platform plugins

* only inspect workers if configured to do so

* [navigation] use an index.scss file

* add yarn.lock symlink

* set pluginScanDirs in test so fixtures stay consistent

* cleanup helpers a little

* fix type error

* support KBN_OPTIMIZER_MAX_WORKERS for limiting workers via env

* test support for KBN_OPTIMIZER_MAX_WORKERS

* expand the available memory for workers when only running one or two

* add docs about KBN_OPTIMIZER_MAX_WORKERS environment variable

* fix README link

* update kbn/pm dist

* implement bundle caching/reuse

* update kbn/pm dist

* don't check for cache if --no-cache is passed

* update renovate config

* standardize on index.scss, move console styles over

* add support for --no-cache to cli

* include worker config vars in optimizer version

* ignore concatenated modules

* update integration test

* add safari to browserslist to avoid user-agent warnings in dev

* update docs, clean up optimizer message/misc naming

* always handle initialized messages, don't ignore states that are attached to specific events

* reword caching docs, add environment var to disable caching

* tweak logging and don't use optimizer.useBundleCache as that's disabled in dev

* handle change notifications

* batch changes for 1 second

* rename CompilerState type to CompilerMsg

* getChanges() no longer needs to assign changes to dirs

* remove unused deps

* split up run_worker.ts and share cacheKey generation logic

* add a couple docs

* update tests and remove unused imports

* specify files when creating bundle cache key

* remove one more unused import

* match existing dev cli output more closely

* update kbn/pm dist

* set KBN_NP_PLUGINS_BUILT to avoid warning in CI

* avoid extending global window type

* add note to keep pluginScanDirs in sync

* pass browserslistEnv in workerConfig so it is used for cache key

* load commons.bundle.js in parallel too

* emit initialized+success states if all bundles are cached

* load bootstraps as quickly as possible

* skip flaky suite

* bump

* update jest snapshots

* remove hashing from cache key generation

* remove unnecessary non-null assertion

* improve docs and break up Optimizer#run()

* remove unused import

* refactor kbn/optimizer to break up observable logic, implement more helpful cache invalidation logic with logging

* fix tests

* add initializing phase

* avoid rxjs observable constructor

* remove unnecessary rxjs helper, add tests for bundle cache

* update consumers of optimizer

* update readme with new call style

* replace "new platform" with "kibana platform"

* fix a couple more renames

* add support for several plain-text file formats

* fix naming of OptimizerMsg => OptimizerUpdate, use "store" naming too

* one more OptimizerMsg update

* ensure bundles are not cached when cache config is false

* test for initializing states and bundle cache events

* remove unnecessary timeout change

* Remove unnecessary helpers

* Add tests for BundleCache class

* Add tests for Bundle class

* test summarizeEvent$

* missing paths are no longer listed in mtimes map

* add tests for optimizer/cache_keys

* Add some extra docs

* Remove labeled loop

* add integration test for kbn-optimizer watcher components

* querystring-browser removed

* tweak logging a smidge, improve info and final message

* remove unused imports

* remove duplication of getModuleCount() method

* move type annotation that validates things

* clear up the build completion message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* [kbn/optimizer] Fix windows support (#57592)

* [kbn/optimizer] simplify run_workers.ts a smidge

* use Path.resolve() to create windows paths from normalized ones

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 343bc9c303)

* remove istanbul/code coverage references

* fix webpack config syntax

* removal of querystring-browser was backported to 7.x

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-14 11:35:24 -07:00