Commit Graph

53150 Commits

Author SHA1 Message Date
Jim Ferenczi f30f1f04e2
Replace AggregatorTestCase#search with AggregatorTestCase#searchAndReduce (#60816)
This commit removes the ability to test the top level result of an aggregator
before it runs the final reduce. All aggregator tests that use AggregatorTestCase#search
are rewritten with AggregatorTestCase#searchAndReduce in order to ensure that we test
the final output (the one sent to the end user) rather than an intermediary result
that could be different.
This change also removes spurious commits triggered on top of a random index writer.
These commits slow down the tests and are redundant with the commits that the
random index writer performs.
2020-08-10 17:23:00 +02:00
David Roberts dd02e9f31a [TEST] Mute SearchableSnapshotActionIT testSearchableSnapshotForceMergesIndexToOneSegment (#60904)
Due to https://github.com/elastic/elasticsearch/issues/60901
2020-08-10 15:25:39 +01:00
James Rodewig 739097a56c
[DOCS] Move `min_score` docs to search API page (#60895) (#60896)
Reformats the `min_score` docs as a param definition on the
search API reference page.
2020-08-10 09:43:07 -04:00
Henning Andersen a155315ceb
Autoscaling decider and decision service (#59005) (#60884)
Split the autoscaling decider into a service and configuration
in order to enable having additional context information available
in the service. Added AutoscalingDeciderContext holding generic
information all deciders are expected to need. Implemented GET
_autoscaling/decision
2020-08-10 15:28:52 +02:00
James Rodewig 8a0f1d8746
[DOCS] Combine highlighting docs files (#60849) (#60892) 2020-08-10 09:05:49 -04:00
Dan Hermann 192dc9dd3d
[DOCS] Update get data stream API (#60862) 2020-08-10 08:03:17 -05:00
David Turner f44c28b595
Deprecate and ignore join timeout (#60872)
There is no point in timing out a join attempt any more once a cluster
is entirely in 7.x. Timing out and retrying with the same master is
pointless, and an in-flight join attempt to one master no longer blocks
attempts to join other masters. This commit deprecates this unnecessary
setting and removes its effect from the joining process.

Relates #60873 which removes this setting in master.
2020-08-10 13:57:41 +01:00
Andrei Dan 235e5ed3ea
[7.x] ILM: add force-merge step to searchable snapshots action (#60819) (#60882)
This adds a force-merge step to the searchable snapshot action, enabled by default,
but parameterizable using the `force_merge-index" optional boolean.

eg.
```
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "cold": {
        "actions": {
          "searchable_snapshot" : {
            "snapshot_repository" : "backing_repo",
            "force_merge_index": true
          }
        }
      }
    }
  }
}
```

(cherry picked from commit d0a17b2d35f1b083b574246bdbf3e1929471a4a9)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
2020-08-10 13:45:11 +01:00
Rene Groeschke e03993d238
Make jdk download repo not consumable (#60875)
- fixes #60860
2020-08-10 14:22:42 +02:00
Martijn van Groningen 64bb082f9b
Improve error message for non append-only writes that target data stream (#60874)
Backport of #60809 to 7.x branch.

Closes #60581
2020-08-10 13:18:59 +02:00
David Kyle 6b2ddf4453
Fix typo in DataHistogramGroupByIT name (#60880) (#60883) 2020-08-10 11:55:01 +01:00
David Turner f168bdac7d Change transitive -> transient in ILM log message (#60871)
"Transitive" is technically ok here but it's an overloaded word and it's
not immediately clear which meaning is intended so this log message
always makes me do a double-take. I think both "transient" and
"transitory" are clearer, with "transient" being the usual choice.
2020-08-10 11:37:49 +01:00
Alan Woodward e8d9185045 Cut over IPFieldMapper to parametrized form (#60602)
This commit makes IpFieldMapper extend ParametrizedFieldMapper. It also
updates the IpFieldMapper docs to add the ignore_malformed parameter,
which was not previously documented.
2020-08-10 11:01:10 +01:00
David Turner a2d5bfca2f Even longer timeout for XPackRestIT (#60812)
This suite is still occasionally failing with a timeout on macOS.
Suggest further increasing this timeout until this suite is broken up.

Relates #58071
2020-08-10 10:26:21 +01:00
David Turner 1f49e0b9d0 Fix testRerouteOccursOnDiskPassingHighWatermark (#60869)
Sometimes this test would refresh the disk stats so quickly that it hit
the refresh rate limiter even though it was almost completely disabled.
This commit allows the rate limiter to be completely disabled.

Closes #60587
2020-08-10 09:39:44 +01:00
Rory Hunter 3bac6db466
Use explicit GID in 7.x when chrooting in Docker entrypoint (#60859)
Closes #60853. After upgrading to CentOS 8, the behaviour of chroot has
subtly changed. Now we have to explicitly set the GID in order to get
the previous behaviour of creating files with GID 0.
2020-08-08 10:26:17 +01:00
Rory Hunter 5c76978e80 Wait for ES in Docker to start before checking files (#60825)
Closes #54817.
2020-08-07 14:20:14 +01:00
Mark Vieira 8e9f8ba420
Mute DockerTests.test010Install 2020-08-06 16:45:41 -07:00
Ryan Ernst cf39a69be3
Exit gradle run task if any node dies (#60789)
The Elasticsearch `run` task in Gradle is backed by testclusters
spinning up a node and waiting indefinitely on output from that node.
However, this thread currently waits for an interrupt to exit. If
Elasticsearch fails to start, we hang indefinitely. This commit adds a
check after each poll of the process stdout to see if it is still alive,
and fails the build if it has died.

closes #60761
2020-08-06 15:54:43 -07:00
Ryan Ernst ddcfbec569
Add assert message for multiple lines in osprobe (#60796)
Several /proc files are expected to contain a single line. We assert on
this in tests, but the contents of the file are lost and the assertion
therefore lacks important information to debug why the file appeared to
have multiple lines. This commit dumps the contents of the file on
assertion failure.

relates #59284
2020-08-06 15:53:30 -07:00
Ryan Ernst 479f32906d
Cleanup vagrant setup (#60697)
Though bats tests were recently removed, there remains a few unnecessary
setups needed for those tests in our vagrant files, as well as CI setup.
Additionally, we no longer rely on the vagrant images setting a
JAVA_HOME, instead relying on DistroTestPlugin to pull the appropriate
jdk when testing with no-jdk distributions.
2020-08-06 15:37:56 -07:00
Ryan Ernst fc38af363e
Ensure latch is counted down when assertion trips (#60800)
The ReloadSecureSettingsIT uses latches to ensure coordination across
requests to the underlying in memory cluster. However, in the case of an
expected failure, if the assertion fails, the latch will never be
counted down, and will cause the test to hang indefinitely. This commit
ensures the latch is always counted down with a try/finally.

relates #51546
2020-08-06 15:33:46 -07:00
Jim Ferenczi 98119578a1 Disable sort optimization on search collapsing (#60838)
Collapse search queries that sort by a field can throw
an ArrayStoreException due to a bug in the [sort optimization](https://github.com/elastic/elasticsearch/pull/51852)
introduced in 7.7.0. Search collapsing were not supposed to
be eligible for this sort optimization so this change explicitly
filters them from this new feature.
2020-08-06 21:37:12 +02:00
James Rodewig 788778c139
[DOCS] Move inner hits content to separate page (#60840) (#60843)
Moves inner hits content from the deprecated 'Request Body Search'
chapter to a separate page.
2020-08-06 14:06:01 -04:00
James Rodewig a761985fab
[DOCS] Move script and stored fields content to search fields page (#60826) (#60835)
Changes:

* Moves `Retrieve selected fields` to its own page and adds a title abbreviation.
* Adds existing script and stored fields content to `Retrieve selected fields`
* Adds a xref for `Retrieve selected fields` to `Search your data`
* Adds related redirects and updates existing xrefs
2020-08-06 13:06:06 -04:00
Jim Ferenczi 14980ff97e Fix AOOBE when setting min_doc_count to 0 in significant_terms (#60823)
This commit fixes the computation of the subset size on empty buckets (doc count of 0).
The aggregator test refactoring in #60683 revealed this bug.
2020-08-06 18:57:09 +02:00
Mark Tozzi fb7c431d8d
[DOCS] Update snapshot repo usage (#60791) (#60831)
Clarify how to use our snapshot repository.  Several folks were confused about this just now, including myself.
2020-08-06 12:29:21 -04:00
James Rodewig ff4ea4720a
[DOCS] Update example data stream names (#60783) (#60820)
Uses `my-data-stream` in place of `logs` for data stream examples.
This provides a more intuitive experience for users that copy/paste
their own values into snippets.
2020-08-06 09:38:35 -04:00
David Turner 721198c29e Increase logging in testRerouteOccursOnDiskPassingHighWatermark (#60817)
Relates #60587
2020-08-06 14:08:09 +01:00
Armin Braun a2c7991e96
Fix CompressibleBytesOutputStreamTests (#60815) (#60822)
Since #60730 the `bytes` field can be `null`. This adds the missing `null` check to the test
override.

Closes #60814
2020-08-06 15:07:48 +02:00
Benjamin Trent bc17afc535
[7.x] [ML] have DELETE analytics ignore stats failures and clean up unused stats (#60776) (#60784)
* [ML] have DELETE analytics ignore stats failures and clean up unused stats (#60776)

When deleting an analytics configuration, the request MIGHT fail if
the .ml-stats index does not exist or is in strange state (shards unallocated).

Instead of making the request fail, we should log that we were unable to delete the stats docs and then
have them cleaned up in the 'delete_expire_data' janitorial process
2020-08-06 08:55:35 -04:00
Rory Hunter 69645ee4ff Upgrade Docker image from CentOS 7 to 8 2020-08-06 13:44:58 +01:00
Steven Goossens a62c5ae11b Upgrade Centos version in Dockerfile to 8 (#59019) 2020-08-06 13:44:58 +01:00
David Turner 273a6f916d AwaitsFix for #60814 2020-08-06 12:56:28 +01:00
David Turner 05b2a2db8b AwaitsFix for #60781 2020-08-06 12:28:53 +01:00
David Turner f24a3a4e81 AwaitsFix for 60781 2020-08-06 11:35:44 +01:00
Rene Groeschke 91e956e96a
Simplify jdk downloads via artifact transforms (#60713) (#60803)
* Simplify jdk downloads via artifact transforms

This reworks the jdk download plugin to use artifact transforms.
That allows us to simplify the jdk download plugin by a lot. The
benefits of using artifact transforms are:

- they transform an artifact to an upacked folder on the fly as part
of the dependenc resolution allowing us to remove all the custom created unpack tasks
and configurations

- Artifact transforms support gradle build cache. Requesting a jdk folder on a clean machine
will likely be resolved from the build cache

- The manual mingling about not extracting jdks multiple times by all jdks channeling through
root project configurations can be removed as they support up-to-date checking and build cache
which will ensure these archives are only resolved once per build at max.

Also the test coverage has been ported to Spock that supports data driven testing. This porting
includes an introduction to a wiremock fixture that can be used later on for mocking repository
urls in other integration tests

* Simplify artifact transform registration

* Change jdk finalization and repository setup

Jdk finalization is now done via `configuration.defaultDependencies`.
This has two benefits:
- we only configure and finalize the JDKs we actually use during the build
- afterEvaluate hooks are problematic in combination with task avoidance api.
Relying on task avoidance api in Gradle moves more configuration logic into the materialization
of tasks which is, with task avoidance api, is done ideally during the task graph calculation.
Anything created (e.g. jdks) created late in this task graph calculation would never be finalized
via afterEvaluate hooks as this has been fired before already with the jdk not there yet.

Furthermore we now only configure repositories in the projects where the jdk is declared
(aka the jdk-download plugin is applied) and only if the jdk is actually requested during the build.

* Fix javadoc

* Fix jdk download repo content filtering

* Minor cleanup

* Apply review feedback and cleanup
2020-08-06 12:34:20 +02:00
Martijn van Groningen 9163c9ce36
Adjust hlrc data streams integration test (#60804)
Backport of #60746

to wait for at least a single shard to be allocated for a backing index of a data stream,
so that total store size is larger than zero (which is what the tests expects).

Closes #60461
2020-08-06 11:57:12 +02:00
Hendrik Muhs b210aaf666 [Transform] remove wrong test (#60807)
remove test, scripts are excluded in the change collector, the test is a leftover from a previous
solution of #57332, which has been discarded

relates #60724
fixes #60794
2020-08-06 11:56:19 +02:00
David Turner 75c0e4d044 AwaitsFix for #51619 2020-08-06 09:48:35 +01:00
Dimitris Athanasiou cedbe6968b
[7.x][ML] Include cause in logging during test inference (#60749) (#60805)
When an exception is thrown during test inference we are
not including the cause message in our logging. This commit
addresses this issue.

Backport of #60749
2020-08-06 11:45:59 +03:00
Rene Groeschke f8a63bbdb5
Fix deprecation warning in fips.gradle (#60802) 2020-08-06 10:09:05 +02:00
Russ Cam d593c963f3
Use deprecated object to deprecate synced flush API (#57096)
Relates: #50835

This commit updates the synced flush REST API spec to
deprecate the whole API.
2020-08-06 15:17:26 +10:00
Russ Cam 152d330369 Change vm.max_map_count on Docker WSL2 backend (#58153)
This commit adds docs for how to change
vm.max_map_count when running on Docker
Desktop with WSL2 backend on Windows.
2020-08-06 14:28:15 +10:00
Ryan Ernst e641981c15
Remove reference to bats test (#60696)
The packagingTest tasks run by CI (but not by PRs...) was still
refering to bats tasks. This commit removes those remaining references.

closes #60690
2020-08-05 14:59:00 -07:00
Ryan Ernst b883c17990
Re-enable lintian packaging test (#60698)
It appears the odd permission problems of NOTICE and the lintian
overrides file have disappeared, probably through further build cleanup.
This commit re-enables the lintian tests.

closes #58730
2020-08-05 14:58:12 -07:00
Tim Brooks 2f76c48ea7
Propagate forceExecution when acquiring permit (#60634)
Currently the transport replication action does not propagate the force
execution parameter when acquiring the indexing permit. The logic to
acquire the index permit supports force execution, so this parameter
should be propagate. Fixes #60359.
2020-08-05 15:57:40 -06:00
Ryan Ernst d88098c1d5
Mute flaky transform pivot test
see https://github.com/elastic/elasticsearch/issues/60794
2020-08-05 14:53:25 -07:00
Ryan Ernst 7514526b6b
Convert packaging upgrade tests to java (#60560) (#60680)
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes #59145
closes #46005
2020-08-05 14:05:37 -07:00
James Rodewig 3a9bf33993
[DOCS] Remove metrics sidebar in `_source` docs (#60777) (#60786) 2020-08-05 16:19:47 -04:00