Commit Graph

24 Commits

Author SHA1 Message Date
Dimitris Athanasiou 2aeff7713c [ML] Parsing objects from internal indices should be lenient (elastic/x-pack-elasticsearch#4256)
All ML objects stored in internal indices are currently parsed
strictly. This means unknown fields lead to parsing failures.
In turn, this means we cannot add new fields in any of those
objects (e.g. bucket, record, calendar, etc.) as it is not
backwards compatible.

This commit changes this by introducing lenient parsing when
it comes to reading those objects from the internal indices.
Note we still use strict parsing for the objects we read from
the c++ process, which is nice as it guarantees we would detect
if any of the fields were renamed on one side but not the other.

Also note that even though this is going in from 6.3, we cannot
introduce new fields until 7.0.

relates elastic/x-pack-elasticsearch#4232

Original commit: elastic/x-pack-elasticsearch@3f95d3c7b9
2018-03-29 17:32:57 +01:00
Dimitris Athanasiou bee81758c5 [ML][TEST] Data timestamps in OverallBucketsIT should be seconds
Original commit: elastic/x-pack-elasticsearch@a875a0f682
2018-03-28 11:50:51 +01:00
Jay Modi b0cc5afe8b Disable security for trial licenses by default (elastic/x-pack-elasticsearch#4120)
This change disables security for trial licenses unless security is
explicitly enabled in the settings. This is done to facilitate users
getting started and not having to deal with some of the complexities
involved in getting security configured. In order to do this and avoid
disabling security for existing users that have gold or platinum
licenses, we have to disable security after cluster formation so that
the license can be retrieved.

relates elastic/x-pack-elasticsearch#4078

Original commit: elastic/x-pack-elasticsearch@96bdb889fc
2018-03-21 21:09:44 -06:00
David Kyle aa566a55e3 [ML] Persist realtime datafeed job after lookback (elastic/x-pack-elasticsearch#4146)
* Wire in new Persist job action

* Persist after loopback if realtime job

Original commit: elastic/x-pack-elasticsearch@c24101e9cf
2018-03-21 16:31:59 +00:00
Lee Hinman b14baf4a6f Decouple XContentBuilder from BytesReference (elastic/x-pack-elasticsearch#4119)
* Decouple XContentBuilder from BytesReference

This commit handles the removal of all mentions of BytesReference from
XContentBuilder. This is needed so that we can completely decouple the XContent
code and move it into its own dependency.

This is the x-pack side of https://github.com/elastic/elasticsearch/pull/28972

Original commit: elastic/x-pack-elasticsearch@8ba2e97b26
2018-03-14 13:48:05 -06:00
Tom Veasey 1d525f998c Model memory has increased so we need to update some integration test thresholds (elastic/x-pack-elasticsearch#4033)
Original commit: elastic/x-pack-elasticsearch@f9b77230ce
2018-03-14 10:59:25 +00:00
David Roberts 2dd0fbca7a [TEST] Mute tests that will need updating following an ML C++ change
Relates elastic/x-pack-elasticsearch#4033
Relates elastic/ml-cpp#7

Original commit: elastic/x-pack-elasticsearch@de297097f3
2018-02-26 09:09:40 +00:00
Ryan Ernst d7c097e2b4 Build: Remove specifying zip distribution in qa tests (elastic/x-pack-elasticsearch#4037)
This is the xpack side of https://github.com/elastic/elasticsearch/pull/28805

Original commit: elastic/x-pack-elasticsearch@48cbe6623f
2018-02-23 18:17:59 -08:00
Lee Hinman c763a14132 Pass InputStream when creating XContent parser (elastic/x-pack-elasticsearch#4001)
* Pass InputStream when creating XContent parser

Rather than passing the raw `BytesReference` in when creating the xcontent
parser, this passes the StreamInput (which is an InputStream), this allows us to
decouple XContent from BytesReference.

This is the x-pack side of https://github.com/elastic/elasticsearch/pull/28754

* Use the streamInput variant, not sourceAsString

Original commit: elastic/x-pack-elasticsearch@dd5d8b1654
2018-02-23 15:22:28 -07:00
Luca Cavanna 79bc6d9a53 Remove AcknowledgedRestListener in favour of RestToXContentListener (elastic/x-pack-elasticsearch#3985)
Adapt to AcknowledgedRestListener removal 

Original commit: elastic/x-pack-elasticsearch@74c08fcf02
2018-02-22 09:13:58 +01:00
Lee Hinman affc9e3563 Move more XContent.createParser calls to non-deprecated version (elastic/x-pack-elasticsearch#3928)
Part 2

This moves more of the callers to pass in the DeprecationHandler.

Relates to elastic/x-pack-elasticsearch#28504

Original commit: elastic/x-pack-elasticsearch@e0b52bf050
2018-02-14 09:41:26 -07:00
Lee Hinman e8ef20b219 Move more XContent.createParser calls to non-deprecated version (elastic/x-pack-elasticsearch#3927)
* Move more XContent.createParser calls to non-deprecated version

This moves more of the callers to pass in the DeprecationHandler.

Relates to https://github.com/elastic/elasticsearch/issues/28504

* Mockito ಠ_ಠ

Original commit: elastic/x-pack-elasticsearch@81cb99ba52
2018-02-14 09:24:47 -07:00
David Kyle 0023572acb [ML] Fix test logic in MlJobIT::testDelete_multipleRequest (elastic/x-pack-elasticsearch#3937)
Original commit: elastic/x-pack-elasticsearch@a9a457e286
2018-02-14 15:09:31 +00:00
Dimitris Athanasiou 245a063492 [ML][TEST] Rewrite RestoreModelSnapshotIT to make more robust (elastic/x-pack-elasticsearch#3925)
Now that the forecast API is available, we can use it to significantly
simplify this test. The test is rewritten to leverage the contract
that when a forecast is requested to a job without state it fails.

relates elastic/x-pack-elasticsearch#3909

Original commit: elastic/x-pack-elasticsearch@978ae352c5
2018-02-14 12:09:05 +00:00
Dimitris Athanasiou 2f4dcf36a9 [ML] Add notification for job updates coming from a user action (elastic/x-pack-elasticsearch#3890)
We were missing a notification for when a job is updated. This is
useful so users know that there's been changes which could justify
a change in the job behaviour.

In addition, having those notifications allows our integrations
tests to know when the update was processed which avoids having
to use `sleep()` with its instabilities.



Original commit: elastic/x-pack-elasticsearch@0b4eda2232
2018-02-13 18:46:00 +00:00
Tim Brooks 5dbbe8fef8 Default to basic license at startup (elastic/x-pack-elasticsearch#3878)
This is related to elastic/x-pack-elasticsearch#3877. This commit modifies the license settings to
default to self generating a basic license.

Original commit: elastic/x-pack-elasticsearch@cd6ee8e06f
2018-02-12 12:57:04 -07:00
Dimitrios Athanasiou 5d1a5f27b2 [ML][TEST] Readjust AutodetectMemoryLimitIT assertions
Model memory has decreased slightly due to
elastic/machine-learning-cpp#553. This commit adjusts
the test assertions accordingly.

Original commit: elastic/x-pack-elasticsearch@ea8d403f1a
2018-02-12 14:53:14 +00:00
Martijn van Groningen d2e7cee41d fixed compile error
Original commit: elastic/x-pack-elasticsearch@ff02a3244c
2018-01-31 15:38:14 +01:00
David Kyle 6c849534da [ML][TEST] Clean up jobs after SE test
Original commit: elastic/x-pack-elasticsearch@c71aafeb06
2018-01-30 14:34:36 +00:00
David Kyle 10fae5e58f [ML][TEST] Scheduled events integration test (elastic/x-pack-elasticsearch#3555)
* Scheduled events integration test

Original commit: elastic/x-pack-elasticsearch@8181645fe5
2018-01-30 10:38:13 +00:00
Dimitris Athanasiou 664fcccb8b [ML][TEST] Add integ test for categorical rule (elastic/x-pack-elasticsearch#3739)
Original commit: elastic/x-pack-elasticsearch@975a10f810
2018-01-29 11:45:04 +00:00
Ryan Ernst 5a86450df7 Build: Replace references to x-pack-elasticsearch paths with helper methods (elastic/x-pack-elasticsearch#3748)
In order to more easily integrate xpack once it moves into the
elasticsearch repo, references to the existing x-pack-elasticsearch need
to be reduced. This commit introduces a few helper "methods" available
to any project within xpack (through gradle project extension
properties, as closures). All refeerences to project paths now use these
helper methods, except for those pertaining to bwc, which will be
handled in a followup.

Original commit: elastic/x-pack-elasticsearch@850668744c
2018-01-26 21:48:30 -08:00
David Kyle 2356830782 [ML][TEST] Disable monitoring for ML QA tests (elastic/x-pack-elasticsearch#3751)
Original commit: elastic/x-pack-elasticsearch@4c3192e964
2018-01-26 10:10:52 +00:00
Ryan Ernst 3e24ea3ed2 Test: Add internalClusterTest to xpack modules (elastic/x-pack-elasticsearch#3730)
This commit reenables running ITs in xpack by adding an internalClusterTest to xpack modules that contain ESIntegTestCase tests. The new task allows us to run these independently of rest integ tests, which are disabled for xpack modules because installing the bundled plugins directly is not quite the same as installing via the meta plugin. Some tests (ML) are moved to their own qa module to accommodate the need for a real cluster. A couple tests (monitoring and upgrade) have been marked as AwaitsFix.

Commits that have been folded into this commit:
* Move ML IT tests to qa/ml-native-tests
* Add internalClusterTest task and disable rest integ tests for xpack
modules. Also tweak ML tests and get upgrade tests working
* Adding the keystore and security back to the ml native tests
* Fixing native integ test
* Fix last ML test, add awaits fix to monitoring and upgrade tests
* cleanup PR
* fix checkstyle

Original commit: elastic/x-pack-elasticsearch@3c0ed6fd3b
2018-01-25 10:38:34 +01:00