Skip to content

Commit

Permalink
Merge branch 'upstream/master' into number-support-single-type
Browse files Browse the repository at this point in the history
* upstream/master: (150 commits)
  Fix ComposableIndexTemplate equals when composed_of is null (elastic#80864)
  Optimize DLS bitset building for matchAll query (elastic#81030)
  URL option for BaseRunAsSuperuserCommand (elastic#81025)
  Less Verbose Serialization of Snapshot Failure in SLM Metadata (elastic#80942)
  Fix shadowed vars pt7 (elastic#80996)
  Fail shards early when we can detect a type missmatch (elastic#79869)
  Delegate Ref Counting to ByteBuf in Netty Transport (elastic#81096)
  Clarify `unassigned.reason` docs (elastic#81017)
  Strip blocks from settings for reindex targets (elastic#80887)
  Split off the values supplier for ScriptDocValues (elastic#80635)
  [ML] Switch message and detail for model snapshot deprecations (elastic#81108)
  [DOCS] Update xrefs for snapshot restore docs (elastic#81023)
  [ML] Updates visiblity of validate API (elastic#81061)
  Track histogram of transport handling times (elastic#80581)
  [ML] Fix datafeed preview with remote indices (elastic#81099)
  [ML] Fix acceptable model snapshot versions in ML deprecation checker (elastic#81060)
  [ML] Add logging for failing PyTorch test (elastic#81044)
  Extending the timeout waiting for snapshot to be ready (elastic#81018)
  [ML] Fix incorrect logging of unexpected model size error (elastic#81089)
  [ML] Make inference timeout test more reliable (elastic#81094)
  ...

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java
  • Loading branch information
weizijun committed Nov 30, 2021
2 parents 5dd8ed9 + 2629c32 commit 91f8003
Show file tree
Hide file tree
Showing 890 changed files with 16,377 additions and 9,919 deletions.
1 change: 1 addition & 0 deletions .ci/jobs.t/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
url: https://github.com/elastic/elasticsearch/
- inject:
properties-content: |
COMPOSE_HTTP_TIMEOUT=120
JOB_BRANCH=%BRANCH%
HOME=$JENKINS_HOME
GRADLEW=./gradlew --parallel --scan --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
properties-content: |
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
./.ci/os.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ destructiveDistroUpgradeTest.v$BWC_VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/jdk11
JAVA15_HOME=$HOME/.java/jdk15
JAVA16_HOME=$HOME/.java/jdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true check
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true check
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true check
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
JAVA_HOME=$USERPROFILE\\.java\\$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$USERPROFILE\\.java\\$ES_RUNTIME_JAVA
JAVA11_HOME=$USERPROFILE\\.java\\java11
JAVA15_HOME=$USERPROFILE\\.java\\openjdk15
JAVA16_HOME=$USERPROFILE\\.java\\openjdk16
- batch: |
del /f /s /q %USERPROFILE%\.gradle\init.d\*.*
mkdir %USERPROFILE%\.gradle\init.d
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs.t/elastic+elasticsearch+periodic+ear.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/bin/bash
# Configure a dm-crypt volume backed by a file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs.t/elastic+elasticsearch+pull-request+bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed bwcTestSnapshots
50 changes: 50 additions & 0 deletions .ci/jobs.t/elastic+elasticsearch+pull-request+cloud-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
- job:
name: "elastic+elasticsearch+pull-request+cloud-deploy"
display-name: "elastic / elasticsearch - pull request cloud-deploy"
description: "Testing of Elasticsearch pull requests - cloud-deploy"
workspace: "/dev/shm/elastic+elasticsearch+pull-request+cloud-deploy"
node: "general-purpose && docker"
scm:
- git:
refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*"
branches:
- "${ghprbActualCommit}"
triggers:
- github-pull-request:
org-list:
- elastic
allow-whitelist-orgs-as-admins: true
trigger-phrase: '.*run\W+elasticsearch-ci/cloud-deploy.*'
github-hooks: true
status-context: elasticsearch-ci/cloud-deploy
cancel-builds-on-update: true
black-list-target-branches:
- 6.8
excluded-regions:
- ^docs/.*
white-list-labels:
- 'cloud-deploy'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
properties-content: |
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh buildCloudDockerImage
- shell: |
#!/bin/bash
set +x
VAULT_TOKEN=$(vault write -field=token auth/approle/login role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID)
export VAULT_TOKEN
export DOCKER_REGISTRY_USERNAME="$(vault read -field=username secret/elasticsearch-ci/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD="$(vault read -field=password secret/elasticsearch-ci/prod_docker_registry_credentials)"
export ES_VERSION=$(grep 'elasticsearch' build-tools-internal/version.properties | awk '{print $3}')
export DOCKER_TAG=docker.elastic.co/elasticsearch-ci/elasticsearch-cloud:${ES_VERSION}-${ghprbActualCommit:0:7}
docker tag elasticsearch-cloud:test $DOCKER_TAG
echo $DOCKER_REGISTRY_PASSWORD | docker login -u $DOCKER_REGISTRY_USERNAME --password-stdin docker.elastic.co
unset VAULT_TOKEN DOCKER_REGISTRY_USERNAME DOCKER_REGISTRY_PASSWORD
set -x
docker push $DOCKER_TAG
34 changes: 34 additions & 0 deletions .ci/jobs.t/elastic+elasticsearch+pull-request+example-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
- job:
name: "elastic+elasticsearch+pull-request+example-plugins"
display-name: "elastic / elasticsearch - pull request example-plugins"
description: "Testing of Elasticsearch pull requests - example-plugins"
workspace: "/dev/shm/elastic+elasticsearch+pull-request+example-plugins"
scm:
- git:
refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*"
branches:
- "${ghprbActualCommit}"
triggers:
- github-pull-request:
org-list:
- elastic
allow-whitelist-orgs-as-admins: true
trigger-phrase: '.*run\W+elasticsearch-ci/example-plugins.*'
github-hooks: true
status-context: elasticsearch-ci/example-plugins
cancel-builds-on-update: true
white-list-labels:
- ':Delivery/Build'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
properties-content: |
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
cd plugins/examples
$WORKSPACE/.ci/scripts/run-gradle.sh -Dorg.gradle.jvmargs=-Xmx8g build --include-build $WORKSPACE
2 changes: 1 addition & 1 deletion .ci/jobs.t/elastic+elasticsearch+pull-request+full-bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed v$BWC_VERSION#bwcTest
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
./.ci/os.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ destructiveDistroUpgradeTest.v$BWC_VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
properties-content: |
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.fips.enabled=true checkPart1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
properties-content: |
JAVA_HOME=$USERPROFILE\\.java\\$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$USERPROFILE\\.java\\$ES_RUNTIME_JAVA
JAVA15_HOME=$USERPROFILE\\.java\\openjdk15
JAVA16_HOME=$USERPROFILE\\.java\\openjdk16
GRADLE_TASK=checkPart1
- batch: |
del /f /s /q %USERPROFILE%\.gradle\init.d\*.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
properties-content: |
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.fips.enabled=true checkPart2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
properties-content: |
JAVA_HOME=$USERPROFILE\\.java\\$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$USERPROFILE\\.java\\$ES_RUNTIME_JAVA
JAVA15_HOME=$USERPROFILE\\.java\\openjdk15
JAVA16_HOME=$USERPROFILE\\.java\\openjdk16
GRADLE_TASK=checkPart2
- batch: |
del /f /s /q %USERPROFILE%\.gradle\init.d\*.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed checkRestCompat
3 changes: 2 additions & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
## On ARM we use a different properties file for setting java home
## Also, we don't bother attempting to resolve dependencies for the 6.8 branch
source $(dirname "${SCRIPT}")/java-versions-aarch64.properties
export JAVA15_HOME="${HOME}"/.java/jdk15
export JAVA16_HOME="${HOME}"/.java/jdk16
else
source $(dirname "${SCRIPT}")/java-versions.properties
## We are caching BWC versions too, need these so we can build those
Expand All @@ -29,6 +29,7 @@ else
export JAVA13_HOME="${HOME}"/.java/openjdk13
export JAVA14_HOME="${HOME}"/.java/openjdk14
export JAVA15_HOME="${HOME}"/.java/openjdk15
export JAVA16_HOME="${HOME}"/.java/openjdk16

## 6.8 branch is not referenced from any bwc project in master so we need to
## resolve its dependencies explicitly
Expand Down
2 changes: 1 addition & 1 deletion .ci/templates.t/generic-gradle-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh {gradle-args}
2 changes: 1 addition & 1 deletion .ci/templates.t/matrix-gradle-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh {gradle-args}
2 changes: 1 addition & 1 deletion .ci/templates.t/pull-request-gradle-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
JAVA8_HOME=$HOME/.java/java8
JAVA11_HOME=$HOME/.java/java11
JAVA15_HOME=$HOME/.java/openjdk15
JAVA16_HOME=$HOME/.java/openjdk16
- shell: |
#!/usr/local/bin/runbld --redirect-stderr
$WORKSPACE/.ci/scripts/run-gradle.sh {gradle-args}
27 changes: 18 additions & 9 deletions TESTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,37 @@

[partintro]

Elasticsearch uses jUnit for testing, it also uses randomness in the
tests, that can be set using a seed, the following is a cheatsheet of
options for running the tests for ES.
Elasticsearch uses JUnit for testing. It also generated random inputs into
tests, either using a random seed, or one that is set via a system
property. The following is a cheatsheet of options for running the
Elasticsearch tests.

== Creating packages

To create a distribution without running the tests, simply run the
following:
To build a distribution for your local OS and print its output location upon completion, run:

-----------------------------
./gradlew assemble
./gradlew localDistro
-----------------------------

To create a platform-specific build including the x-pack modules, use the
following depending on your operating system:
To create a platform-specific build, use the following depending on your
operating system:

-----------------------------
./gradlew :distribution:archives:linux-tar:assemble
./gradlew :distribution:archives:darwin-tar:assemble
./gradlew :distribution:archives:darwin(-aarch64)-tar:assemble
./gradlew :distribution:archives:windows-zip:assemble
-----------------------------

You can build a Docker image with:

-----------------------------
./gradlew build(Aarch64)DockerImage
-----------------------------

Note: you almost certainly don't want to run `./gradlew assemble` as this
will attempt build every single Elasticsearch distribtion.

=== Running Elasticsearch from a checkout

In order to run Elasticsearch from source without building a package, you can
Expand Down
Loading

0 comments on commit 91f8003

Please sign in to comment.