Commit graph

1277 commits

Author SHA1 Message Date
Josh Dover e116fce08e
Add server.publicBaseUrl config (#85075) 2020-12-08 17:02:39 -07:00
Poff Poffenberger 8467b89202
[Time to Visualize] Add visualizations to dashboard from save modal (#83140)
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-12-08 15:39:24 -06:00
Stacey Gammon de15f164d9
Convert a README to mdx to get it slurped up by the new docs system (#84834)
* Convert readme to mdx so it can get slurped into the new docs system

* Adjust plugin list doc generation so it accounts for mdx readmes

* fix eslint of discover_plugin file

* Fix link to readme in plugin list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-08 15:12:07 -05:00
Alison Goryachev 7b362458e7
Enhancements to painless autocomplete in monaco (#85055) 2020-12-08 12:16:06 -05:00
Alison Goryachev f8edc51ece
Implement error reporting in monaco for painless language (#84695) 2020-12-08 10:07:07 -05:00
Spencer a7c5b49343
[esArchiver] support kibana and es ssl from cli (#85073)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-07 13:20:15 -07:00
Alison Goryachev 079a7e82ba
Integrate painless autocomplete in runtime fields editor (#84943) 2020-12-07 12:55:53 -05:00
Spencer fd1328f6f8
[cli/dev] remove cluster module, modernize, test (#84726)
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 14:28:06 -07:00
Tiago Costa 6be3cf4f9f
chore(NA): check git version on pre-commit hook install (#84811)
* chore(NA): checks installed git version when installing pre-commit hook

* chore(NA): throw an error instead of log a warning

* chore(NA): use createFailError instead

* fix(NA): apply feedback from pr review for isCorrectGitVersionInstalled

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 19:10:33 +00:00
Ahmad Bamieh aa9a353205
[Telemetry] Introduce UI Counters (#84224)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 17:47:04 +02:00
Tyler Smalley 74ef540e42
[CI] Enables APM collection (#81731)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-03 09:25:40 -08:00
Thomas Watson 3ae73653ff
Improve logging pipeline in @kbn/legacy-logging (#84629) 2020-12-03 09:34:45 +01:00
Thomas Watson 770a00530d
Catch @hapi/podium errors (#84575) 2020-12-03 09:33:48 +01:00
Mikhail Shustov 78123a109d
Rename server.xsrf.whitelist to server.xsrf.allowlist (#84791)
* rename xsrd.whitelist to xsrf.allowlist

* update docs

* update telemetry schema

* update kbn-config tests
2020-12-03 07:19:36 +01:00
Thomas Watson fb48e903d5
Upgrade Node.js to version 14 (#83425) 2020-12-02 23:40:06 +01:00
Tyler Smalley b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Mikhail Shustov 68decb8352
declare kbn/monaco dependency on kbn/i18n explicitly (#84660) 2020-12-01 10:24:54 -07:00
Thomas Watson 920e4fa280
Update code-comments describing babel plugins (#84622) 2020-12-01 15:55:54 +01:00
Mikhail Shustov 1ec2f1d078
Cleanup tsconfig files (#84396)
* remove unused "paths" from tsconfig

* remove unused test utils, import get-url from kbn/test

* dont pollute globals with jest when importing getUrl

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-30 19:12:00 +01:00
Alison Goryachev 7691184184
Support for painless language autocomplete within monaco (#80577) 2020-11-30 10:14:33 -05:00
Pierre Gayvallet b99abe301a
increase stdout max listeners for legacy logging (#84497)
* increase stdout max listeners for legacy logging

* add missing packages to CODEOWNERS
2020-11-30 15:32:59 +01:00
Spencer ea8ea4e4e0
[dev/cli] detect worker type using env, not cluster module (#83977)
* [dev/cli] detect worker type using env, not cluster module

* remove unused property

* assume that if process.send is undefined we are not a child

* update comment

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-25 08:03:47 -07:00
Thomas Watson 115916956d
Use correct version of Podium (#84270) 2020-11-24 22:15:35 +01:00
Tyler Smalley e8a4b7e7dd
[@kbn/utils] Clean target before build (#84253)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-24 11:33:34 -08:00
Dmitry 2634009a5b
[code coverage] collect for oss integration tests (#83907)
* [code coverage] collect for oss integration tests

* do not run snapshot test modified with coverage

* skip failures

* remove debug msg

* update file names

* Update packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts

Co-authored-by: Spencer <email@spalger.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Spencer <email@spalger.com>
2020-11-24 20:32:35 +01:00
Mikhail Shustov 5ec6fe315f
[DX] Bump TS version to v4.1 (#83397)
* bump version to 4.1.1-rc

* fix code to run kbn bootstrap

* fix errors

* DO NOT MERGE. mute errors and ping teams to fix them

* Address EuiSelectableProps configuration in discover sidebar

* use explicit type for EuiSelectable

* update to ts v4.1.2

* fix ts error in EuiSelectable

* update docs

* update prettier with ts version support

* Revert "update prettier with ts version support"

This reverts commit 3de48db3ec.

* address another new problem

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2020-11-24 16:04:33 +01:00
Mikhail Shustov b3d97764a0
Move streams to kbn/utils (#84033)
* move streams to kbn/std

* import streams from kbn/std

* fix styles

* remove unused shareWeakReplay

* move from kbn/std to kbn/utils

* import from subfolder since test mocks FS module and not compatible with kbn/utils

* remove new line at the end of json file
2020-11-24 15:19:18 +01:00
Spencer 8ea529d559
[src/cli/dev] remove broken and unused --open flag (#83966)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-23 11:13:37 -07:00
Tiago Costa b2e01c50c9
chore(NA): remove yarn lock from kbn legacy logging (#84096)
* Revert "[Search] Search batching using bfetch (#83418)"

This reverts commit 5708c5d004.

* chore(NA): remove yarn.lock from kbn-legacy-logging
2020-11-23 17:13:40 +00:00
Mikhail Shustov 95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Pierre Gayvallet e176def756
create kbn-legacy-logging package (#77678)
* create kbn-legacy-logging package and start to move things

* fix rotator tests

* fix logging system test mocks

* move logging format to the package

* move logging setup to package

* adapt legacy logging server

* remove usage of legacy config in the legacy logging server

* move legacy logging server to package

* remove `??` syntax from package

* update generated doc

* fix a few things due to month old merge

* remove typings from project

* move reconfigureLogging to package

* add basic README file

* update generated doc

* remove old typings

* add typing for legacy logging events

* remove `??` from packages

* fix / improve event types usages

* remove suffix from tsconfig
2020-11-22 20:46:38 +01:00
Dmitry 312438ff9b
[code coverage] Update jest config to collect more data (#83804)
* collect code coverage for more files in src/

* update config

* update config according review

* move collectCoverageFrom to preset

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-20 22:30:13 +01:00
Brian Seeders 314e40fba3
[CI] Initial TeamCity implementation (#81043) 2020-11-20 14:32:53 -05:00
spalger fcb83dad86 [kbn/optimizer/node] tweak cache dir to invalidate exiting caches 2020-11-20 09:56:42 -07:00
Spencer 0db0d95142
[kbn/optimizer/node] properly separate lmdb databases, log better (#83849)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-20 09:51:38 -07:00
Mikhail Shustov ec983ef610
do not export types from 3rd party modules as 'type' (#83803)
to avoid inlining. see 9 https://www.techatbloomberg.com/blog/10-insights-adopting-typescript-at-scale/
2020-11-20 15:27:37 +01:00
Thomas Watson 131a1ba91a
Bump jest (and related packages) to v26.6.3 (#83724)
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-20 07:08:04 +01:00
Spencer 45d3861219
Revert lmdb-store upgrade (#83830)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 13:10:58 -07:00
Dario Gieselaar 5d05eeaab9
Improve snapshot error messages (#83785) 2020-11-19 15:58:15 +01:00
Nicolas Chaulet 1b6cfe819d
[Fleet] Rename ingestManager plugin ID fleet (#83200) 2020-11-19 08:43:14 -05:00
Dario Gieselaar 3a8ea2993f
Make expectSnapshot available in all functional test runs (#82932)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-19 08:38:51 +01:00
Robert Oskamp f2ad337fef
Increase bulk request timeout during esArchiver load (#83657)
This PR fixes some timeouts during esArchive load by increasing the request timeout.
2020-11-19 07:05:10 +01:00
Tiago Costa f2d97a9fe2
chore(NA): update lmdb store to v0.8.15 (#83726)
* chore(NA): upgrade lmdb-store to v0.8.15

* chore(NA): remove unused ts-error statements
2020-11-19 00:08:50 +00:00
Mikhail Shustov 4917df30b9
Update typescript eslint to v4.8 (#83520)
* update deps

* update rules

use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead

* fix or mute all lint errors

* react-hooks eslint plugin fails on ? syntax

* fix wrong typings in viz

* remove React as a global type

* fix eslint errors

* update version to 4.8.1

* fix a new error
2020-11-18 18:23:08 +01:00
Sébastien Loix e3c2dccf00
[Runtime fields] Editor phase 1 (#81472)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-18 09:10:00 +01:00
Spencer 859ba3efa3
[kbn/plugin-helpers/build] copy the public assets of a plugin (#83458)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-16 15:07:57 -07:00
Spencer 422dd2b6d5
upgrade to lmdb-store 0.8 (#83479)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-16 15:04:34 -07:00
Alejandro Fernández Haro 90729c6e19
Remove dependency of tests on strict SyntaxKind values (#83440) 2020-11-16 17:37:49 +00:00
John Schulz 380fa5b3f6
[bundle optimization] Update to semver 7.x to get tree-shaking (#83020)
## What's changed in this PR
### Update to latest available `semver`: `7.3.2`
 * `semver` 5.x pulls in the entire library in one large file (~38k uncompressed / ~9k gz), when we might only use 1-2K.
 * `semver` 7.0+ supports tree-shaking: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#700

### Update paths to only import individual function(s) used instead of the entire library
  * Getting the smaller bundle requires a different import style [as shown in the docs](https://github.com/npm/node-semver#usage)
  * Only changed code in `public` & `common` folders; not `server`. We could also update `server` as well for consistency, but I skipped because the new import style is more verbose and the filesize didn't seem as important on the server

### Results
The build stats show a 10K+ improvement for initial page bundles https://github.com/elastic/kibana/pull/83020#issuecomment-724724432

| id | [before](c6afc47f32) | [after](213bb52a8c) | diff |
| --- | --- | --- | --- |
| `ingestManager` | 386.2KB | 373.9KB | -12.3KB |
| `telemetry` | 63.5KB | 50.1KB | -13.5KB |
| `upgradeAssistant` | 74.5KB | 60.5KB | -14.0KB |
| total |  |  | -39.7KB |

### The import paths look odd. Are they required?
I agree and, no, they're not strictly required. If you'd like me to revert to the prior style just drop a comment and I'll undo them.

The caveat is that the current style (in `master` & this PR) pulls in the entire `semver` library. In 7.x that added ~15K to the initial size. Some more details in the comments: https://github.com/elastic/kibana/pull/83020#issuecomment-724859130

### Possible issues
Moving 2 major versions. We're currently on 5.7 and the latest available is 7.3. 
  * changelog says 5.x (our current) to 6.0 should be safe: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#60
  * There 6.x & 7.x changes all appear to be new features or bugfixes around the `includePrerelease` flag added in 5.6, but I'm not sure if those "fixes" will break existing code
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#613
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#722

### Stats / screenshots
generated with `node scripts/build_kibana_platform_plugins.js --profile --focus=ingestManager`
<details><summary><b>Ingest Manager in `master`</b>: imports entire `semver` lib, totals 40k+, only 1 large file (orange arc below)</summary>

<img width="972" alt="Screen Shot 2020-11-09 at 6 50 23 PM" src="https://user-images.githubusercontent.com/57655/98666188-a50ac380-231a-11eb-9b8a-6ca784752714.png">
</details>

<details><summary><b>Ingest Manager in PR after upgrade to 7</b>: still imports entire lib. file size *increased* to ~60k, but now individual files are imported (orange arcs below)</summary>
<img width="825" alt="Screen Shot 2020-11-09 at 5 46 30 PM" src="https://user-images.githubusercontent.com/57655/98666355-e602d800-231a-11eb-803f-bc04beb4eaf1.png">
<img width="963" alt="Screen Shot 2020-11-09 at 5 47 06 PM" src="https://user-images.githubusercontent.com/57655/98666357-e69b6e80-231a-11eb-92d3-c66904f92c30.png">
</details>

<details><summary><b>Ingest Manager in PR after changing `import`s:</b> total imported size down to ~20k. Can see individual imported files</summary>
<img width="926" alt="Screen Shot 2020-11-10 at 6 10 23 AM" src="https://user-images.githubusercontent.com/57655/98667058-e64fa300-231b-11eb-9690-5e36ed6475e0.png">
<img width="895" alt="Screen Shot 2020-11-10 at 6 10 53 AM" src="https://user-images.githubusercontent.com/57655/98667059-e780d000-231b-11eb-8abf-98d8bdbcf061.png">
</details>

### Checklist

- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2020-11-14 07:32:02 -05:00
Tyler Smalley aba2068291
Consolidates Jest configuration files and scripts (#82671)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-12 16:19:56 -08:00