Commit graph

39 commits

Author SHA1 Message Date
Spencer bedf74faf2
[kbn/es] use artifact api to determine snapshot url (#33893)
* [kbn/es] use artifact api to determine snapshot url

* actually use AbortController

* [kbn/es] handle optional os and jdk indicators in artifact name
2019-03-28 14:29:39 -07:00
Jonathan Budzenski 61f999304b [kbn-es] Platform specific snapshots (#29673) 2019-02-01 20:59:59 -08:00
Tyler Smalley c70aeec6fd
[kbn-es] Support platform specific distributions (#29678)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-01-31 08:41:29 -08:00
Josh Dover 45a4d3bce0
[kbn-es] Add support to kbn-es and kbn-test for data archives (#28723)
* Add support to kbn-es and kbn-test for data archives

* Fix log indent

* Decompress directly to data directory

Co-Authored-By: joshdover <me@joshdover.com>

* Improve logs
2019-01-23 16:45:19 -06:00
Josh Dover 0ba1db2d5b
Add ENV_VAR for overriding ES snapshot version (#28768) 2019-01-15 11:27:54 -06:00
Tiago Costa 45a67701f2
Upgrade to NodeJS 10 (#25157)
* feat(NA): upgrade node js version on file configs.

* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x

* fix(NA): add missing async function declaration.

* chore(NA): updated elastic/good package to work with node10

* chore(NA): update lockfiles.

* fix(NA): add missing dep.

* fix(NA): types for node 10.

* test(NA): fix error return type for node10.

* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.

* test(NA): jest integration test for kbn-pluin-helpers.

* test(NA): fix jest tests for kbn-es.

* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* refact(NA): rewrite tests using mock-fs and completely remove this dependency.

* fix(NA): failing test implementation using jest mock in order to replace mock-fs.

* fix(NA): update jest snapshots to match new ones generated one node 10.

* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.

* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener

* test(NA): fix management advance settings image field test flow.

* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.

* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.

* refact(NA): fix eslint errors.

* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.

* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.

* fix(NA): tslint errors.

* chore(NA): upgrade types node to the last version.

* fix(NA): missing utf8 input format encoding when reading a file.

* chore(NA): upgrade to node 10.14.1

* fix(NA): Buffer api usage to avoid deprecation warnings.
2018-12-10 17:41:51 +00:00
Jonathan Budzenski 70788a9a3c
[es] remove alpha1 suffix (#25763) 2018-11-20 15:51:49 -06:00
Spencer df8514fa09
[kbn/es] add --download flag to snapshot command to warm the cache (#25830)
In order to pre-fetch Elasticsearch snapshots and avoid timeouts during download in images, this adds a `--download` option to the `es snapshot` command.
2018-11-16 15:11:43 -08:00
Josh Dover 77522a7bd2
[kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
Jonathan Budzenski fa8237d197
[build] Support version-qualifier flag (#21663)
* [build] Support version-qualifier flag

* add help description

* fix test

* is-release

* temp: re-add alpha1 to package.json

* use version qualifier in build

* fix merge

* Revert "temp: re-add alpha1 to package.json"

This reverts commit a70688542c.

* x-pack

* remove ci build flag

* remove ci build flag

* remove qualifier from canvas

* remove qualifier from infra

* fix x-pack argv

* update comment
2018-11-02 09:39:12 -05:00
Spencer 59206ec096
[kbn/es] add context to error message (#24664)
This just tweaks the kbn-es error message to provide more context than just `Not Found`
2018-10-26 16:57:08 -07:00
spalger 9a8557c3ef [kbn-es] remove class property from untranspiled js 2018-10-22 12:45:44 -07:00
liza-mae 5d64140953
Update rmrfSync method (#23854)
* Update rmrfSync method

* Add catch statement

* Fix lint issues

* switch to del package

* remove old rmrf_sync module

* Fix CI failure del is not a function error

* Fix spaces
2018-10-22 12:12:20 -06:00
liza-mae 53011f7a9e
Initial handling of windows process termination (#23441)
* Initial handling of windows process termination

* Update exiting ES cluster process on windows

* Use tree-kill

* Add dependency

* Update with solution from Spencer

* Remove catch statement
2018-10-22 12:10:33 -06:00
Spencer d22bdfec46
[yarn] Upgrade to 1.10.1 (#23971)
* [yarn] upgrade required version

* [yarn] update lock files to include integrity

* [yarn] coalesce locked readable-stream versions to avoid yarn bug
2018-10-15 14:34:30 -07:00
Josh Dover cea1301127
Remove elasticsearch package from kbn-es (#23662) 2018-10-02 10:19:33 -05:00
Spencer b55705e9b4
[ts] enable support for iterators in browsers (#22986)
I was surprised when I tried to spread a `Set` in TypeScript and the browser complained about `Set.slice()` not being defined. This is because TypeScript does not automatically enable support for iterators when targeting earlier ES versions, like we do in the browser, unless you use the `"downlevelIteration": true` compiler option. This injects some helpers into the necessary files for reading/spreading iterators, which can be stuffed behind an import statement with using the `"importHelpers": true` compiler option and include `tslib` in our dependencies. This is already a dependency of several of our packages, so it shouldn't cause any additional modules.
2018-09-13 14:18:13 -07:00
Spencer 4d9bc2f121
[devUtils/toolingLog] give tooling log configurable writers (#22110)
* [devUtils/toolingLog] give tooling log configurable writers

* property shorthand

* remove redundant parameter

* call Error.captureStackTrace when subclassing Error

* describe why we skip stack trace logging for CliError

* always return true/false from log writers

* improve type definitions, writeTo is just an object with write method

* get rid of weird dedent for failures
2018-08-21 17:09:27 -07:00
Lee Drengenberg da1268d322
Fix es unzip (#21817)
* Rebuild modulePath correctly if on Windows

* fix it so we create empty dirs like /logs/
2018-08-09 09:08:33 -05:00
Felix Stürmer 1211efdf40
Upgrade prettier to version 1.14.0 (#21466)
This upgrades prettier to version 1.14.0. The main motivation is to gain support for the new TypeScript language features introduced in 2.9 and 3.0.

Prettier versions 1.13 and 1.14 also introduced some other JavaScript and TypeScript style improvements resulting in a few small line break and parenthesis changes.

The relevant release notes are:

* [Prettier 1.13.0 Release Notes](https://prettier.io/blog/2018/05/27/1.13.0.html)
* [Prettier 1.40.0 Release Notes](https://prettier.io/blog/2018/07/29/1.14.0.html)
2018-07-31 15:30:36 +02:00
Tyler Smalley 489e5bbbe6
[kbn-es] Only enable security for trial (#20803)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-26 14:41:06 -07:00
Tyler Smalley 46bacc6c64
Workaround for yarn interdependency conflicts (#20805)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-16 07:42:49 -07:00
Tiago Costa b142f80d7d
Match chalk dependency version on kibana with the one used on x-pack (#20621)
* chore(NA): match chalk dependency version on kibana with x-pack to ^2.3.2.

* chore(NA): bump chalk version dependencies and update lock files.
2018-07-13 00:26:57 +01:00
Tim Roes cb5ee01c6a
Increase prettier line width to 100 (#20535)
* Increase prettier line width to 100

* Fix packages JS prettier

* Change style guide to 100 width

* Fix line-width in latest master changes
2018-07-09 22:50:37 +02:00
Tyler Smalley ee0610bd6b
[kbn-es] Windows uses zip snapshot, Linux uses tar. (#20503)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-09 09:35:51 -07:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Aleh Zasypkin 18037984da
Upgrade rxjs: 6.1.0 ---> 6.2.1. (#20209) 2018-06-25 20:04:19 +02:00
spalger 53cb1712f4 [kbn-es] update yarn.lock 2018-06-20 11:49:13 -07:00
Spencer f0cc432faf
Apache 2.0 license headers (#19383)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.

Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:

```
node scripts/eslint --fix && node scripts/tslint --fix
```
2018-05-28 20:06:30 -07:00
Tyler Smalley 7c784db2f1
[kbn-es] Updates location of ES OSS snapshot (#18938)
ES snapshots are located again within the base elasticsearch directory and NOT within an additionally nested elasticsearch-oss directory

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-05-09 09:29:15 -07:00
Tyler Smalley 5cb9cd7d33
[kbn-es] Fixes ES snapshot path for OSS builds (#17860)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-04-24 15:42:49 -07:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Spencer 1fd537821f
[kbn-es] add basic integration tests for exit code/promise handling (#17600) 2018-04-18 12:59:19 -07:00
Spencer f0d01928db
[@kbn/es] fix promise and CLI error handling (#17596)
* [kbn-es/cluster] fix promise handling to properly route success/failure

* [kbn-es/cli] catch errors that bubble to the CLI and log with a bit of style

* [kbn-es] fix promise handling when building from source

* [kbn-es] check for inverse of .stop() condition

* [kbn-es/cluster] resolve promise is cluster stops cleanly

* [kbn-es/cluster/start] reject if ES exits before starting
2018-04-06 12:58:37 -07:00
spalger caca7755cc [yarn] update lockfile 2018-03-28 16:54:36 -07:00
Tyler Smalley 46a5ef1316
[kbn-es] Wait for close event (#17448)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-28 14:22:53 -07:00
Tyler Smalley e5e025d732
[kbn-es] Allows error to bubble up (#17358)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-23 07:28:45 -07:00
Spencer 026d140aaf
[kbn-es] download to destPath.tmp rather than /tmp (#17322)
When kbn-es downloads a snapshot, it writes the in progress download to
`/tmp` rather than the destination path in case the download fails part
way through, then renames the file from `/tmp` to the final location.
This is a good practice, but in CI the `/tmp` directory isn't stored on
the same disk as the project, which causes a rename error to occur
because we're attempting to rename across devices.

This updates the download logic to write to `${destPath}.tmp` instead,
and do the same renaming, so that we can avoid cross-device errors.
2018-03-21 17:46:12 -07:00
Tyler Smalley 82e17f435f
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-20 08:30:15 -07:00