Skip to content

Merge Remote Tracking Branch #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
57bd6d2
Reintroduce system index APIs for Kibana (#54858)
jaymode Apr 8, 2020
bb44726
[DOCS] Reworks some parts of EMM API docs (#54872)
szabosteve Apr 8, 2020
a5ec204
Allocate searchable snapshots with the balancer (#54889)
DaveCTurner Apr 8, 2020
93c6d77
Fix Incorrect Concurrent SnapshotException on Master Failover (#54877)
original-brownbear Apr 8, 2020
72be0b5
SQL: Implement DATETIME_FORMAT function for date/time formatting (#54…
matriv Apr 8, 2020
7e3a1f4
Add runner settings to remote debug configuration in IntelliJ (#54912)
imotov Apr 8, 2020
bfe19d5
[DOCS] Fix typo in SLM retention docs (#54797)
chtitux Apr 8, 2020
70241b5
SQL: drop BASE TABLE type in favour for just TABLE (#54836)
bpintea Apr 8, 2020
ad7f1f7
Remove guard around atomic move supported check (#54917)
jasontedor Apr 8, 2020
cc16df2
Defer node environment construction (#54919)
jasontedor Apr 8, 2020
5fe52b0
Require JDK 14 for compilation (#54696)
jasontedor Apr 8, 2020
aac7e1b
Fix PercolatorQuerySearchIT#testPercolatorQueryExistingDocument test …
talevy Apr 8, 2020
2726621
Set minimal support version of DataStreamMetadata to 7.7.0, (#54949)
martijnvg Apr 8, 2020
f3f8ae5
Set JAVA14_HOME in CI (#54955)
jasontedor Apr 8, 2020
c7dc033
Add allowed warnings to index template composition tests (#54916)
dakrone Apr 8, 2020
d67df3a
ILM use Priority.IMMEDIATE for stop ILM cluster update (#54909)
andreidan Apr 8, 2020
ff6c5ed
ILM add cluster update timeout on step retry (#54878)
andreidan Apr 8, 2020
7aef7b3
[DOCS] EQL: Document `between` function (#54950)
jrodewig Apr 8, 2020
db04fd2
Add Snapshot Resiliency Test for Master Failover during Delete (#54866)
original-brownbear Apr 8, 2020
73b5f58
Fix Broken Math in S3 Retries Tests (#54952)
original-brownbear Apr 8, 2020
e5d6fd4
Use V2 templates when reading duplicate aliases and ingest pip… (#54902)
dakrone Apr 8, 2020
3b84f8a
Mute SamlServiceProviderDocumentTests.testStreamRoundTripWithAllFields
mark-vieira Apr 8, 2020
df395ca
Mute S3BlobContainerRetriesTests.testReadBlobWithPrematureConnectionC…
mark-vieira Apr 8, 2020
abed62e
Lazy test cluster module and plugins (#54852)
jakelandis Apr 8, 2020
13d1683
Allow different source sets from forbiddenApis (#54731)
jakelandis Apr 8, 2020
152da4e
[DOCS] Update upgrade docs for 7.7 (#54977)
jrodewig Apr 8, 2020
1ff5b85
add back darwin-tar/build.gradle (whoops)
jakelandis Apr 8, 2020
7d8cf1c
Mute ModelLoadingServiceTests.testMaxCachedLimitReached
mark-vieira Apr 8, 2020
6fd6895
Add new instruction for Eclipse (#54894)
nik9000 Apr 8, 2020
a4b1d6e
EQL: indexOf function implementation (#54543)
astefan Apr 8, 2020
1ad2905
Enable searchable snapshots for release tests (#54987)
mark-vieira Apr 8, 2020
3b5fb80
Improve total build configuration time (#54611)
mark-vieira Apr 8, 2020
2e73fe3
Bump minimum version for component template CRUD test (#54992)
dakrone Apr 8, 2020
2b23cd5
Mute S3BlobContainerRetriesTests.testReadRangeBlobWithRetries
mark-vieira Apr 8, 2020
df44a82
[Transform] fix sporadic test failure due to unavailable notif… (#54939)
Apr 9, 2020
d4394d4
Fix NPE in MetadataIndexTemplateService#findV2Template (#54945)
probakowski Apr 9, 2020
86d1268
Fix S3 Blob Container Retries Test Range Handling (#55000)
original-brownbear Apr 9, 2020
1d9096f
Preserve Task Id for ML Datafeed (#54943)
albertzaharovits Apr 9, 2020
bafd129
Temporarily preserve data streams after each yaml rest test has execu…
martijnvg Apr 9, 2020
372681b
Clear recent errors when auto-follow successfully (#54997)
dnhatn Apr 9, 2020
b5c5002
Reduce memory for big aggs run against many shards (#54758)
nik9000 Apr 9, 2020
ea6152c
Deprecate serializing PipelineAggregators (#54926)
nik9000 Apr 9, 2020
b1b067c
[DOCS] Adds link points to the data frame analytics supported fields …
szabosteve Apr 9, 2020
605f9c6
Correct the name of the docvalues_fields object parser.
jtibshirani Apr 9, 2020
7003ac4
[DOCS] Collapse nested objects in cluster reroute docs (#54851)
patelvp Apr 9, 2020
7bccbf4
Update IDE integration to reflect Java 14 requirement (#54990)
mark-vieira Apr 9, 2020
af7ea67
Improve robustness of Query Result serializations (#54692)
imotov Apr 9, 2020
3febcd8
SQL: Implement DATETIME_PARSE function for parsing strings (#54960)
matriv Apr 9, 2020
e348959
Prevent putting V2 index template when overlapping with existing temp…
probakowski Apr 10, 2020
201adaf
EQL: Deprecate lenient sequence declaration (#55032)
costin Apr 10, 2020
a7460d6
Explicitly test rewrite of date histogram's time zones on date_nanos …
jimczi Apr 10, 2020
2c6df68
Do not execute ML CRUD actions when upgrade mode is enabled (#54437)
przemekwitek Apr 10, 2020
9d38dcf
EQL: Add cascading search cancellation (#54843)
imotov Apr 10, 2020
f26235b
Mute testSearchableSnapshotAction in TimeSeriesLifecycleActions tests…
dliappis Apr 10, 2020
a0cb977
Clarify available processors (#54907)
jasontedor Apr 10, 2020
e867dfa
[DOCS] Add token filter reference docs template (#52290)
jrodewig Apr 10, 2020
4ec2424
[DOCS] Add query reference docs template (#52292)
jrodewig Apr 10, 2020
e67eab6
Clean up even more instances of "metaData"
jasontedor Apr 10, 2020
33dc417
[DOCS] EQL: Document `wildcard` function (#54086)
jrodewig Apr 10, 2020
16e9433
Fix ReloadSecureSettings API to consume password (#54771)
jkakavas Apr 10, 2020
f7809dd
Preserve parent task id for data frame analytics (#55046)
albertzaharovits Apr 10, 2020
6d28596
Add support for filters to T-Test aggregation (#54980)
imotov Apr 10, 2020
1328e4b
Add missing override annotation to HistoVS (#54534)
not-napoleon Apr 10, 2020
8e8ce96
value_count Aggregation optimization (#54854)
xjtushilei Apr 10, 2020
3106fd9
EQL: Add string function (#54470)
rw-access Apr 10, 2020
5ee2792
Mute test in versions that do not support pwd protected keystores (#5…
jkakavas Apr 10, 2020
5cbd05b
[DOCS] Relocate `indices` module content (#54903)
jrodewig Apr 10, 2020
dd72ccb
Fail sniff process if no connections opened (#54934)
Tim-Brooks Apr 10, 2020
1b69477
Async search: create internal index only before storing initial respo…
javanna Apr 10, 2020
da5cf73
Make some agg tests easier to read (#54954)
nik9000 Apr 10, 2020
f2c0ad6
Update opensuse 15.1 os identifier
mark-vieira Apr 10, 2020
6efa5c5
Replace license check isAuthAllowed with isSecurityEnabled (#54547)
rjernst Apr 10, 2020
3966191
Fixes for IntelliJ IDEA 2020.1 support (#55077)
mark-vieira Apr 10, 2020
cf87ed3
Passthrough special characters in thread pool docs (#55080)
jasontedor Apr 10, 2020
600ccc0
[DOCS] Relocate "Plugins" page (#54974)
jrodewig Apr 10, 2020
fa138ed
[DOCS] EQL: Reword field support for EQL functions (#55074)
jrodewig Apr 10, 2020
e05d618
Update policy-definitions.asciidoc (#54592)
DanRoscigno Apr 10, 2020
6ce8803
Deprecate local parameter for get field mapping request (#55014)
ywangd Apr 12, 2020
fba2da8
[ML] Mute testSnapshotDeleteWithMasterFailover (#55104)
dimitris-athanasiou Apr 13, 2020
176416e
Further improve InternalTTestTests (#55081)
imotov Apr 13, 2020
99c68e5
[DOCS] Collapse nested objects in Explore API docs (#55067)
patelvp Apr 13, 2020
1c24553
EQL: Fix release build of EQL (#55113)
imotov Apr 13, 2020
437c62f
[DOCS] Note where ILM policies are stored and backup caveats (#54859)
geekpete Apr 13, 2020
28ff719
[DOCS] EQL: Document `string` function (#55086)
jrodewig Apr 13, 2020
6eab90b
Prepare for backport of TTest filters (#55072)
imotov Apr 13, 2020
e36d75f
Adjust bwc version for BanParentTaskRequest
dnhatn Apr 13, 2020
942e688
[ML] inference only persist if there are stats (#54752)
benwtrent Apr 13, 2020
998a085
[DOCS] Edits create data frame analytics job API (#54751)
lcawl Apr 13, 2020
e593f3e
Add analytics plugin usage stats to _xpack/usage (#54911)
imotov Apr 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ci/dockerOnLinuxExclusions
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# (as is the case on centos-6, for example) then that OS will again be
# excluded.
debian-8
opensuse-15-1
opensuse-leap-15.1
ol-7.7
sles-12.3 # older version used in Vagrant image
sles-12.5
Expand Down
2 changes: 1 addition & 1 deletion .ci/java-versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# build and test Elasticsearch for this branch. Valid Java versions
# are 'java' or 'openjdk' followed by the major release number.

ES_BUILD_JAVA=openjdk13
ES_BUILD_JAVA=openjdk14
ES_RUNTIME_JAVA=openjdk11
GRADLE_TASK=build
1 change: 1 addition & 0 deletions .ci/jobs.t/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
JAVA11_HOME=$HOME/.java/java11
JAVA12_HOME=$HOME/.java/openjdk12
JAVA13_HOME=$HOME/.java/openjdk13
JAVA14_HOME=$HOME/.java/openjdk14
GRADLE_OPTS=-XX:+HeapDumpOnOutOfMemoryError -Xmx128m -Xms128m
properties:
- github:
Expand Down
1 change: 1 addition & 0 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ export JAVA8_HOME="${HOME}"/.java/java8
export JAVA11_HOME="${HOME}"/.java/java11
export JAVA12_HOME="${HOME}"/.java/openjdk12
export JAVA13_HOME="${HOME}"/.java/openjdk13
export JAVA14_HOME="${HOME}"/.java/openjdk14
./gradlew --parallel clean -s resolveAllDependencies

4 changes: 4 additions & 0 deletions .idea/runConfigurations/Debug_Elasticsearch.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 62 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ Contributing to the Elasticsearch codebase

**Repository:** [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch)

JDK 13 is required to build Elasticsearch. You must have a JDK 13 installation
JDK 14 is required to build Elasticsearch. You must have a JDK 14 installation
with the environment variable `JAVA_HOME` referencing the path to Java home for
your JDK 13 installation. By default, tests use the same runtime as `JAVA_HOME`.
your JDK 14 installation. By default, tests use the same runtime as `JAVA_HOME`.
However, since Elasticsearch supports JDK 11, the build supports compiling with
JDK 13 and testing on a JDK 11 runtime; to do this, set `RUNTIME_JAVA_HOME`
JDK 14 and testing on a JDK 11 runtime; to do this, set `RUNTIME_JAVA_HOME`
pointing to the Java home of a JDK 11 installation. Note that this mechanism can
be used to test against other JDKs as well, this is not only limited to JDK 11.

Expand All @@ -109,8 +109,7 @@ script on Windows in the root of the repository. The examples below show the
usage on Unix.

We support development in IntelliJ versions IntelliJ 2019.2 and
onwards. We would like to support Eclipse, but few of us use it and has fallen
into [disrepair][eclipse].
onwards and Eclipse 2020-3 and onwards.

[Docker](https://docs.docker.com/install/) is required for building some Elasticsearch artifacts and executing certain test suites. You can run Elasticsearch without building all the artifacts with:

Expand All @@ -122,9 +121,9 @@ You can access Elasticsearch with:

### Importing the project into IntelliJ IDEA

Elasticsearch builds using Java 13. When importing into IntelliJ you will need
Elasticsearch builds using Java 14. When importing into IntelliJ you will need
to define an appropriate SDK. The convention is that **this SDK should be named
"13"** so that the project import will detect it automatically. For more details
"14"** so that the project import will detect it automatically. For more details
on defining an SDK in IntelliJ please refer to [their documentation](https://www.jetbrains.com/help/idea/sdk.html#define-sdk).
SDK definitions are global, so you can add the JDK from any project, or after
project import. Importing with a missing JDK will still work, IntelliJ will
Expand All @@ -136,6 +135,62 @@ You can import the Elasticsearch project into IntelliJ IDEA via:
- In the subsequent dialog navigate to the root `build.gradle` file
- In the subsequent dialog select **Open as Project**

### Importing the project into Eclipse

Elasticsearch builds using Gradle and Java 13. When importing into Eclipse you
will either need to use an appropriate JDK to run Eclipse itself (e.g. by
specifying the VM in [eclipse.ini](https://wiki.eclipse.org/Eclipse.ini) or by
defining the JDK Gradle uses by setting **Prefercences** > **Gradle** >
**Advanced Options** > **Java home** to an appropriate version.

IMPORTANT: If you have previously imported the project by running `./gradlew eclipse`
then you must build an entirely new workspace and `git clean -xdf` to
blow away *everything* that the gradle eclipse plugin made.

- Select **File > Import...**
- Select **Existing Gradle Project**
- Select **Next** then **Next** again
- Set the **Project root directory** to the root of your elasticsearch clone
- Click **Finish**

This will spin for a long, long time but you'll see many errors about circular
dependencies. Fix them:

- Select **Window > Preferences**
- Select **Java > Compiler > Building**
- Look under **Build Path Problems**
- Set **Circular dependencies** to **Warning**
- Apply that and let the build spin away for a while

Next you'll want to import our auto-formatter:

- Select **Window > Preferences**
- Select **Java > Code Style > Formater**
- Click **Import**
- Import the file at **buildSrc/formatterConfig.xml**
- Make sure it is the **Active profile**

Finally, set up import order:

- Select **Window > Preferences**
- Select **Java > Code Style > Organize Imports**
- Click **Import...**
- Import the file at **buildSrc/elastic.importorder**
- Set the **Number of imports needed for `.*`** to ***9999***
- Set the **Number of static imports needed for `.*`** to ***9999*** as well
- Apply that

IMPORTANT: There is an option in **Gradle** for **Automatic Project Synchronization**.
As convenient as it'd be for the projects to always be perfect this
tends to add many many seconds to every branch change. Instead, you
should manually right click on a project and
**Gradle > Refresh Gradle Project** if the configuration is out of
date.

As we add more subprojects you might have to re-import the gradle project (the
first step) again. There is no need to blow away the existing projects before
doing that.

### REST Endpoint Conventions

Elasticsearch typically uses singular nouns rather than plurals in URLs.
Expand Down Expand Up @@ -551,4 +606,3 @@ non-documentation contribution. This is mentioned above, but it is worth
repeating in this section because it has come up in this context.

[intellij]: https://blog.jetbrains.com/idea/2017/07/intellij-idea-2017-2-is-here-smart-sleek-and-snappy/
[eclipse]: https://github.com/elastic/elasticsearch/issues/53664
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.elasticsearch.gradle.BuildPlugin
import org.elasticsearch.gradle.BwcVersions
import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
import org.gradle.plugins.ide.eclipse.model.AccessRule
import org.gradle.plugins.ide.eclipse.model.SourceFolder
Expand All @@ -37,10 +38,9 @@ plugins {
id 'lifecycle-base'
id 'elasticsearch.docker-support'
id 'elasticsearch.global-build-info'
id "com.diffplug.gradle.spotless" version "3.24.2" apply false
id "com.diffplug.gradle.spotless" version "3.28.0" apply false
}

apply plugin: 'nebula.info-scm'
apply from: 'gradle/build-scan.gradle'
apply from: 'gradle/build-complete.gradle'
apply from: 'gradle/runtime-jdk-provision.gradle'
Expand All @@ -59,7 +59,7 @@ BuildPlugin.configureRepositories(project)

String licenseCommit
if (VersionProperties.elasticsearch.toString().endsWith('-SNAPSHOT')) {
licenseCommit = scminfo.change ?: "master" // leniency for non git builds
licenseCommit = BuildParams.gitRevision ?: "master" // leniency for non git builds
} else {
licenseCommit = "v${version}"
}
Expand Down Expand Up @@ -405,6 +405,14 @@ class Run extends DefaultTask {
public void setDataDir(String dataDirStr) {
project.project(':distribution').run.dataDir = dataDirStr
}

@Option(
option = "keystore-password",
description = "Set the elasticsearch keystore password"
)
public void setKeystorePassword(String password) {
project.project(':distribution').run.keystorePassword = password
}
}

task run(type: Run) {
Expand Down
5 changes: 1 addition & 4 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ dependencies {

compile 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
compile 'com.netflix.nebula:nebula-publishing-plugin:4.4.4'
compile 'com.netflix.nebula:gradle-info-plugin:5.1.0'
compile 'org.eclipse.jgit:org.eclipse.jgit:5.5.0.201909110433-r'
compile 'com.netflix.nebula:gradle-info-plugin:3.0.3'
compile 'com.perforce:p4java:2012.3.551082' // THIS IS SUPPOSED TO BE OPTIONAL IN THE FUTURE....
compile 'com.netflix.nebula:gradle-info-plugin:7.1.3'
compile 'org.apache.rat:apache-rat:0.11'
compile "org.elasticsearch:jna:4.5.1"
compile 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/elastic.importorder
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Eclipse configuration for import order for Elasticsearch
0=
1=com
2=org
3=java
4=javax
5=\#
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import groovy.transform.CompileStatic
import nebula.plugin.info.InfoBrokerPlugin
import org.apache.commons.io.IOUtils
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.info.GlobalBuildInfoPlugin
Expand Down Expand Up @@ -114,13 +115,8 @@ class BuildPlugin implements Plugin<Project> {
}
project.pluginManager.apply('java')
configureConfigurations(project)
configureJars(project) // jar config must be added before info broker
// these plugins add lots of info to our jars
project.pluginManager.apply('nebula.info-broker')
project.pluginManager.apply('nebula.info-basic')
project.pluginManager.apply('nebula.info-java')
project.pluginManager.apply('nebula.info-scm')
project.pluginManager.apply('nebula.info-jar')
configureJars(project)
configureJarManifest(project)

// apply global test task failure listener
project.rootProject.pluginManager.apply(TestFailureReportingPlugin)
Expand Down Expand Up @@ -483,7 +479,7 @@ class BuildPlugin implements Plugin<Project> {
}
// ensure javadoc task is run with 'check'
project.pluginManager.withPlugin('lifecycle-base') {
project.tasks.getByName(LifecycleBasePlugin.CHECK_TASK_NAME).dependsOn(project.tasks.withType(Javadoc))
project.tasks.named(LifecycleBasePlugin.CHECK_TASK_NAME).configure { it.dependsOn(project.tasks.withType(Javadoc)) }
}
configureJavadocJar(project)
}
Expand Down Expand Up @@ -520,19 +516,15 @@ class BuildPlugin implements Plugin<Project> {
ext.set('noticeFile', null)
project.tasks.withType(Jar).configureEach { Jar jarTask ->
// we put all our distributable files under distributions
jarTask.destinationDir = new File(project.buildDir, 'distributions')
jarTask.destinationDirectory.set(new File(project.buildDir, 'distributions'))
// fixup the jar manifest
jarTask.doFirst {
// this doFirst is added before the info plugin, therefore it will run
// after the doFirst added by the info plugin, and we can override attributes
JavaVersion compilerJavaVersion = BuildParams.compilerJavaVersion
jarTask.manifest.attributes(
'Change': BuildParams.gitRevision,
'X-Compile-Elasticsearch-Version': VersionProperties.elasticsearch,
'X-Compile-Lucene-Version': VersionProperties.lucene,
'X-Compile-Elasticsearch-Snapshot': VersionProperties.isElasticsearchSnapshot(),
'Build-Date': BuildParams.buildDate,
'Build-Java-Version': compilerJavaVersion)
'Build-Java-Version': BuildParams.compilerJavaVersion)
}
}
// add license/notice files
Expand Down Expand Up @@ -581,9 +573,22 @@ class BuildPlugin implements Plugin<Project> {
}
}

static void configureTestTasks(Project project) {
ExtraPropertiesExtension ext = project.extensions.getByType(ExtraPropertiesExtension)
static void configureJarManifest(Project project) {
project.pluginManager.apply('nebula.info-broker')
project.pluginManager.apply('nebula.info-basic')
project.pluginManager.apply('nebula.info-java')
project.pluginManager.apply('nebula.info-jar')

project.plugins.withId('nebula.info-broker') { InfoBrokerPlugin manifestPlugin ->
manifestPlugin.add('Module-Origin') { BuildParams.gitOrigin }
manifestPlugin.add('Change') { BuildParams.gitRevision }
manifestPlugin.add('X-Compile-Elasticsearch-Version') { VersionProperties.elasticsearch }
manifestPlugin.add('X-Compile-Lucene-Version') { VersionProperties.lucene }
manifestPlugin.add('X-Compile-Elasticsearch-Snapshot') { VersionProperties.isElasticsearchSnapshot() }
}
}

static void configureTestTasks(Project project) {
// Default test task should run only unit tests
maybeConfigure(project.tasks, 'test', Test) { Test task ->
task.include '**/*Tests.class'
Expand Down
Loading