Commit graph

83 commits

Author SHA1 Message Date
Spencer
e07dffb9d8
[7.6] [kbn/pm] use mtime of untracked files in bootstrap cache key (#64293) (#64606) 2020-04-27 18:21:07 -07:00
Spencer
90a1af177b
[7.6] Implement basic CI metric reporting (#64263) (#64582) 2020-04-27 18:20:26 -07:00
Dmitry Lemeshko
339ba30ecf
update chromedriver dependency to 81.0.0 (#63266) (#63289) 2020-04-11 12:20:44 +03:00
Tiago Costa
5d37ec6905
fix(NA): support legacy plugins path in plugins (#57472) (#57531)
* fix(NA): support legacy plugins path in plugins

* chore(NA): add newly build dist
2020-02-13 04:42:39 +00:00
Tiago Costa
e1fdb21863
Fix paths for kibana packages used by plugins (#57097) (#57410)
* Fix paths for kibana packages in prepare_project_dependencies(#40858).

* Dist/index.js after yarn build.

* chore(NA): correctly include kbm pm new dist file

* Commit after cherry-pick 985c85c from recreation branch.

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

Co-authored-by: Shailesh cheke <shailesh.cheke@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-12 14:42:39 +00:00
Brandon Kobel
433afb04c1
Updating to kind-of@6.0.3 (#57367) (#57379)
* Updating to kind-of@6.0.2

* Rebuilding @kbn\pm
2020-02-11 15:47:30 -08:00
Spencer
a39524c6f5 Fix compatibility with yarn 1.22.0 (#56917)
* Revert "force yarn 1.21.1 until we can handle invalid output of 1.22.0 (#56914)"

This reverts commit 5686010b46.

* move the --json argument before `workspaces` so it still works

* update kbn/pm dist

(cherry picked from commit 12de6a8459)
2020-02-05 14:20:04 -07:00
Tyler Smalley
66249b1f75
Bumps terser-webpack-plugin to 2.3.4 (#56662) (#56891)
We're seeing occasional "Error: Call retries were exceeded" exception
with Terser, which should be resolved by
abfd950620,
first included in 2.3.4

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-02-05 11:23:10 -08:00
Josh Dover
331138237f
[7.x] Add support for workspaces in NP x-pack plugins (#53825) (#54479)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 10:27:02 -07:00
Joe Portner
74ebdf9b11
Add support for certificates in PKCS#12 (P12) key stores (#53810) (#54383)
Kibana now supports the usage of PKCS#12 (P12) key stores and trust stores for certificates and keys.
2020-01-09 14:47:16 -05:00
Spencer
8f8d08367e
[7.x] [dev/run] expose unexpected flags as more than just name… (#54178) 2020-01-07 14:52:17 -07:00
Mikhail Shustov
d7789f20d9
[7.x] Set consistent EOL symbol in core API docs (#53815) (#53977)
* Set consistent EOL symbol in core API docs

* update yarn lock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 14:53:47 +03:00
Spencer
14d8f8a308
[7.x] [kbn/pm] add caching to bootstrap (#53622) (#53953)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

# Conflicts:
#	packages/kbn-pm/dist/index.js
2020-01-03 12:33:11 -07:00
spalger
fa0926510e Revert "[7.x] Update dependency execa to ^3.4.0 (#53072) (#53152)"
This reverts commit eb8a3146dc.
2019-12-17 12:32:39 -07:00
patrykkopycinski
e69183d9f6
[7.x] Update babel-typescript config (#53108) (#53167) 2019-12-17 11:11:03 +01:00
Spencer
eb8a3146dc
[7.x] Update dependency execa to ^3.4.0 (#53072) (#53152)
* Update dependency execa to ^3.4.0

* update kbn/pm dist

* update kbn/pm dist again
2019-12-16 15:33:13 -07:00
spalger
3d4f1f0616 update kbn/pm dist 2019-12-16 12:13:31 -07:00
spalger
95ea6d7f88 update kbn/pm dist 2019-12-16 11:10:51 -07:00
Stacey Gammon
9ed3fe0ccf
Add top level examples folder and command to run, --run-examples. (#52027) (#52739)
* Add top level examples folder and command to run, `--run-examples`.

* Add comment explaining reason --run-examples flag turns off base path.
2019-12-11 10:38:49 -05:00
Spencer
f1bba139fc
Update dependency rxjs to ^6.5.3 (#49837) (#49985)
* Update dependency rxjs to ^6.5.3

* move argument type def up for better coverage

* adapt to possibly undefined helpExtension

* complete definition of deprecation$ type

* define types that bindNodeCallback can no longer infer

* define more types that bindNodeCallback can't infer

* be more explicit and accurate about the types for a subject/observable pair

* fix interface error, TS now identifies it

* ignore a return type flaw because types are not being managed properly

* avoid overspecifying types

* allow types to be inferred where possible

* remove unnecessary withLatestFrom()

* reduce number of rxjs versions installed

* update kbn/pm dist
2019-11-02 09:41:18 -07:00
Spencer
4bd85e3194
[7.x] Remove rimraf (#48985) (#49187)
* Update dependency del to v5

* unify del/rimraf usage with del v5

* update yarn.lock

* update kbn-pm distributable

* remove poorly transformed code

* force some deletes from tmp

* mock less of the fs module

* force tmp deletion in a few more suites

* please make this the last force

# Conflicts:
#	packages/kbn-plugin-helpers/package.json
2019-10-24 08:10:17 -07:00
Spencer
39d0e3c088
[7.x] Update dependency execa to v3 (#48975) (#49139)
* Update dependency execa to v3

* update kbn/pm dist

* remove old @types/execa package

* remove use of removed methods/properties, specify preferLocal when needed

* [@kbn/pm] specify preferLocal when running install scripts

* update kbn/pm dist

* Joi now converts input to matching option from .valid()

* fix failed tests

* Revert "Joi now converts input to matching option from .valid()"

This reverts commit 75531b1d09.
2019-10-23 20:54:03 -07:00
Brandon Kobel
561e6f9a81
Update set-value to 2.0.1 (#49005) (#49119)
* Updating set-value to 2.0.1

* update kbn/pm dist
2019-10-23 15:03:30 -07:00
Nathan L Smith
6b57c79f11
[7.x] [APM] Experimental Service Map front end (#46497) (#47840)
Add service map tabs on the main APM screen and for individual services.

This is not yet hooked up to work with back-end data, so it always shows the same hard-coded graph.

This is experimental, so you must have x-pack.apm.serviceMapEnabled: true in your Kibana config for it to show up.

Also add "PSF" to the list of allowed licenses since a new dependency added uses this license (it's on the [green list](https://github.com/elastic/open-source/blob/master/elastic-product-policy.md#green-list).)

Fixes #44890
Fixes #44853
2019-10-10 13:02:54 -05:00
Spencer
bbacb1c365
[7.x] [mkdirp] remove in favor of recursive fs.mkdir (#47251) (#47333)
* [mkdirp] remove in favor of recursive fs.mkdir

* add eslint rule to educate future contributors

* reword the eslint error message to prevent copy-pasting callback code

* Commit updated kbn-pm dist

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

* Fix typo

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

# Conflicts:
#	renovate.json5
2019-10-04 09:35:21 -07:00
Brandon Kobel
ab2d5672e9
Updating mixin-deep (#46412) (#46607)
* Updating mixin-deep

* update kbn/pm dist
2019-09-25 10:55:11 -07:00
Spencer
c48fa7eea6
[7.x] Update dependency cpy to ^7.3.0 (#46197) (#46540)
* Update dependency cpy to ^7.3.0

* update kbn/pm distributable
2019-09-25 09:04:07 -07:00
Spencer
194943ae1f
[7.x] Update set-value (#46417) (#46425)
* Updating some usages of set-value

* Updating snapdragon which updates transitive set-value

* update kbn/pm dist
2019-09-24 08:07:14 -07:00
Spencer
6dbcc8f050
[7.x] Update dependency cmd-shim to ^2.1.0 (#44034) (#44538)
* Update dependency cmd-shim to ^2.1.0

* rebuild kbn/pm

(cherry picked from commit 06852ed576)
2019-08-30 15:16:06 -07:00
Tyler Smalley
71f89a5275 Updates kbn/pm dist
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-08-29 10:17:58 -07:00
spalger
400cf9fb22 update kbn/pm dist 2019-08-29 08:49:40 -07:00
Spencer
fe25ee98c3
[7.x] Update dependency chalk to ^2.4.2 (#44032) (#44210)
* Update dependency chalk to ^2.4.2

* update kbn-pm dist

(cherry picked from commit dfddf3dbdd)
2019-08-29 08:48:12 -07:00
Spencer
a0513b0cb9
[7.x] Update dependency write-pkg to v4 (#43226) (#43906)
* Update dependency write-pkg to v4

* rebuild kbn-pm and point worker_threads to built-in module
2019-08-27 14:41:36 -07:00
spalger
a82e20fbae update kbn-pm dist 2019-08-26 13:25:18 -07:00
Spencer
376f60a2f7
[7.x] Update read-pkg related packages (major) (#43118) (#43947)
* [7.x] Update read-pkg related packages (major) (#43118)

* Update read-pkg related packages

* update kbn/pm dist

* fix call style

* only pass directories to readPackageJson

(cherry picked from commit 0fb213714c)

* update kbn-pm dist
2019-08-26 10:51:34 -07:00
Spencer
bc7a2c1ead
[7.x] Update webpack related packages (#43903) (#43999)
* Update webpack related packages

* update kbn-pm dist

* update kbn/pm dist

(cherry picked from commit 76d8dbde72)
2019-08-26 09:51:31 -07:00
Spencer
31e7eec1ce
[7.x] Update babel related packages (#43595) (#43837)
* Update babel related packages (#43595)

* upgrade all babel related modules, and bump lodash minors

* update kbn-pm dist

* update fetch-mock, necessary to use core-js 3

* use regenerator transform in jest tests, as required by EUI

* disable useBuiltIns rather than using regenerator plugin

* remove extra regenerator-runtime import

* Update package.json

* update yarn.lock
2019-08-23 08:24:52 -07:00
Andrew Goldstein
c61fe5d68c
[SIEM] Bootstrap Cypress Tests (#39588) (#39868)
# Cypress Tests

The `siem/cypress` directory contains end to end tests (specific to the `SIEM` app) that execute via [Cypress](https://www.cypress.io/).

At present, these tests are only executed in a local development environment; they are **not** integrated in the Kibana CI infrastructure, and therefore do **not** run automatically when you submit a PR.

See the `Server and Authentication Requirements` section below for additional details.

## Organizing Tests and (Mock) Data

- Code and CSS selectors that may be re-used across tests should be added to `siem/cypress/integration/lib`, as described below
- Smoke Tests are located in `siem/cypress/integration/smoke_tests`
- Mocked responses from the server are located in `siem/cypress/fixtures`

### `cypress/integration/lib`

The `cypress/integration/lib` folder contains code intended to be re-used across many different tests.

- Files named `helpers.ts` (e.g. `siem/cypress/integration/lib/login/helpers.ts`) contain functions (e.g. `login`) that may be imported and invoked from multiple tests.

- Files named `selectors.ts` export CSS selectors for re-use. For example, `siem/cypress/integration/lib/login/selectors.ts` exports the following selector that matches the Username text area in the Kibana login page:

```
export const USERNAME = '[data-test-subj="loginUsername"]';
```

## Server and Authentication Requirements

The current version of the Smoke Tests require running a local Kibana server that connects to an instance of `elasticsearch`. A file named `config/kibana.dev.yml` like the example below is required to run the tests:

```yaml
elasticsearch:
  username: 'elastic'
  password: '<password>'
  hosts: ['https://<server>:9200']
```

The `username` and `password` from `config/kibana.dev.yml` will be read by the `login` test helper function when tests authenticate with Kibana.

See the `Running Tests Interactively` section for details.

## Running Tests Interactively

To run tests in interactively via the Cypress test runner:

1. Create and configure a `config/kibana.dev.yml`, as described in the `Server and Authentication Requirements` section above.

2. Start a local instance of the Kibana development server:

```
yarn start --no-base-path
```

3. Launch the Cypress interactive test runner:

```sh
cd x-pack/legacy/plugins/siem
yarn cypress:open
```

4. Click the `Run all specs` button in the Cypress test runner

![cypress](https://user-images.githubusercontent.com/4459398/60113545-39c54f00-972f-11e9-9c0c-5d28aecdf212.gif)

https://github.com/elastic/ingest-dev/issues/515
2019-06-28 11:27:08 -06:00
Court Ewing
a973cbc7a9 Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
spalger
7d103f34d4 update yarn.lock and kbn-pm dist 2019-06-06 19:11:48 -07:00
Tiago Costa
60f852b344
Replace tsc compilation with transpile with babel on kbn plugin helpers for typescript (#36769) (#37642)
* chore(NA): add transpile with babel the typescript files on xpack when build.

* chore(NA): fix the globs for public folders inside server paths

* docs(NA): add comments to explain globs.

* chore(NA): use pipeline instead of async pipeline promise from dev utils. chore(NA): change globs definitions to match the overall convention.

* chore(NA): apply documented way to use stream pipeline.

* chore(NA): exclude test files from the build transpilation.

* chore(NA): add ignore for eslint complexity warning

* chore(na): fix bad added type files.

* fix(NA): unused type exports
2019-05-31 14:07:43 +01:00
Spencer
0f342e3c3f
[7.x] [npm] upgrade getopts (#34603) (#35106)
Backports the following commits to 7.x:
 - [npm] upgrade getopts  (#34603)
2019-04-15 15:45:10 -07:00
Tyler Smalley
ca2027889a
No longer package X-Pack as a node module (#32722) (#34886)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-04-10 15:58:51 -07:00
Tiago Costa
f062c97302
chore(NA): merge and solve conflicts with 7.x (#34645) 2019-04-05 19:14:26 +01:00
Clint Andrew Hall
aecaffc472
[7.x] [Canvas] Storybook for testing and development (#29072) (#34329)
* [Canvas] Storybook for testing and development (#29072)

This PR adds [Storybook](https://storybook.js.org/) to our testing and development suite.

![screen shot 2019-01-21 at 4 35 32 pm](https://user-images.githubusercontent.com/297604/51502196-9f856780-1d9a-11e9-97bf-07c99c3f279b.png)

This will allow us to:

1. create a site outlining all components within Canvas, including their TS type information;
2. demonstrate usage of all components by example;
3. allow for individual component testing, both manually and by Jest;
4. iterate and fix bugs on individual components *without* having to start up Kibana, in a [HMR](https://webpack.js.org/concepts/hot-module-replacement/) environment;
5. automatically generate [snapshots](https://jestjs.io/docs/en/snapshot-testing) based on any examples written;

This PR also converts a few components to Typescript and adds examples.

I was inspired to add this when I was fixing #25342.  In order to fix my changes, I had to run elasticsearch and kibana, as well as refresh my page whenever I needed to test a change.  Had I had a Storybook instance, I would have been done much faster.

In this PR, you'll see I converted `AdvancedFilter` from `renderers` and `FontPicker` and `ImageUpload` from `public/components`.  Would you believe I discovered and fixed bugs just by converting to Typescript and writing examples?

- `onChange` and `commit` are not marked as required in `propTypes`, but the component will error out if they're not supplied.
- `commit` was actually being called twice when 'Apply' was clicked.  This was shown in the 'Actions' panel when I was testing it.

- The `fonts` collection was not strongly-typed, therefore any string could be passed to the `value` parameter without error.
- While the code allows for any font string to be given to the component, there is no way to currently select that value, nor type it in within the control.  This is likely a bug in design.
- The `aria-labeledby` attribute in the drop down includes `undefined`.  This is likely a bug in EUI:

![screen shot 2019-01-21 at 4 25 58 pm](https://user-images.githubusercontent.com/297604/51501908-5ed91e80-1d99-11e9-913a-ce1bb5f4e352.png)

- `cd x-pack/plugins/canvas/`
- Run `node scripts/storybook` to start up a local development version, with HMR.
- Run `node scripts/storybook_build` to build a complete static version of the book.
- Run `node scripts/jest` which will run the Storyshots test; run `node scripts/jest --updateSnapshot` if source code has changed as expected.

- Adding Jest coverage and output to the info panels, ([this](https://www.npmjs.com/package/@storybook/addon-jest) is *sick* functionality).
- Adding automatic [a11y testing](https://www.npmjs.com/package/@storybook/addon-a11y), (currently [blocked](https://github.com/storybooks/storybook/issues/4889)).
- Adding generic knobs for stories
- Adding more example info, (e.g. who edited last, descriptions, etc).

* Update based on errors in CI

* Fix mismerge of dependencies

* Fix yarn.lock as well
2019-04-02 11:21:12 -05:00
Tiago Costa
4213441df7
[7.x] Migration to Babel7 and @babel/preset-typescript (#33093) (#33889)
* chore(NA): merge and solve conflicts with 7.x branch

* docs(NA): fix docs build with page headers.
2019-03-27 00:40:12 +00:00
Spencer
37c44b14f7
[7.x] [ci] rebuild kbn-pm distributatble to ensure it is up-to-date (#33752) (#33801)
* [ci] rebuild kbn-pm distributatble to ensure it is up-to-date (#33752)

* update kbn/pm dist
2019-03-25 14:23:55 -07:00
Eli Perelman
d43f882065
Prefer third-party plugin development in ./plugins instead of ../kibana-extra (#31748) (#32724)
* Prefer third-party plugin development in plugins instead of kibana-extra

* Fix failing recursive directory creation and removal

* Add new built version of kbn-pm
2019-03-08 09:03:56 -06:00
Tiago Costa
ea06d3ce54
fix(NA): update strong-log-transformer version. (#27263) 2018-12-18 16:26:45 +00:00
Tiago Costa
8b9a422dc1
fix(NA): change kbn pm webpack config to generate dist files in mode=none. (#26847) 2018-12-11 00:53:58 +00:00