Skip to content

Commit e332600

Browse files
committed
Merge remote-tracking branch 'elastic/master' into isolate_version_checker
* elastic/master: (309 commits) [test] add fix for rare virtualbox error (elastic#31212) Move default location of dependencies report (elastic#31228) Remove dependencies report task dependencies (elastic#31227) Add recognition of MPL 2.0 (elastic#31226) Fix unknown licenses (elastic#31223) Remove version from license file name for GCS SDK (elastic#31221) Fully encapsulate LocalCheckpointTracker inside of the engine (elastic#31213) [DOCS] Added 'fail_on_unsupported_field' param to MLT. Closes elastic#28008 (elastic#31160) Add licenses for transport-nio (elastic#31218) Remove DocumentFieldMappers#simpleMatchToFullName. (elastic#31041) Allow to trim all ops above a certain seq# with a term lower than X, post backport fix (elastic#31211) Compliant SAML Response destination check (elastic#31175) Remove DocumentFieldMappers#smartNameFieldMapper, as it is no longer needed. (elastic#31018) Remove extraneous references to 'tokenized' in the mapper code. (elastic#31010) Allow to trim all ops above a certain seq# with a term lower than X (elastic#30176) SQL: Make a single JDBC driver jar (elastic#31012) Enhance license detection for various licenses (elastic#31198) [DOCS] Add note about long-lived idle connections (elastic#30990) Move number of language analyzers to analysis-common module (elastic#31143) Default max concurrent search req. numNodes * 5 (elastic#31171) ...
2 parents 90ac928 + f8cbc81 commit e332600

File tree

1,871 files changed

+43215
-21253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,871 files changed

+43215
-21253
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ Before submitting your changes, run the test suite to make sure that nothing is
209209
./gradlew check
210210
```
211211

212+
If your changes affect only the documentation, run:
213+
214+
```sh
215+
./gradlew -p docs check
216+
```
217+
For more information about testing code examples in the documentation, see
218+
https://github.com/elastic/elasticsearch/blob/master/docs/README.asciidoc
219+
212220
### Project layout
213221

214222
This repository is split into many top level directories. The most important

TESTING.asciidoc

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ You can choose which boxes to test by setting the `-Pvagrant.boxes` project prop
379379
the valid options for this property are:
380380

381381
* `sample` - The default, only chooses ubuntu-1404 and centos-7
382-
* List of box names, comma separated (e.g. `oel-7,fedora-26`) - Chooses exactly the boxes listed.
382+
* List of box names, comma separated (e.g. `oel-7,fedora-28`) - Chooses exactly the boxes listed.
383383
* `linux-all` - All linux boxes.
384384
* `windows-all` - All Windows boxes. If there are any Windows boxes which do not
385385
have images available when this value is provided, the build will fail.
@@ -406,8 +406,8 @@ These are the linux flavors supported, all of which we provide images for
406406
* debian-9 aka stretch, the current debian stable distribution
407407
* centos-6
408408
* centos-7
409-
* fedora-26
410409
* fedora-27
410+
* fedora-28
411411
* oel-6 aka Oracle Enterprise Linux 6
412412
* oel-7 aka Oracle Enterprise Linux 7
413413
* sles-12
@@ -512,7 +512,9 @@ into it
512512
vagrant ssh debian-9
513513
--------------------------------------------
514514

515-
Now inside the VM, to run the https://github.com/sstephenson/bats[bats] packaging tests
515+
Now inside the VM, start the packaging tests from the terminal. There are two packaging
516+
test projects. The old ones are written with https://github.com/sstephenson/bats[bats]
517+
and only run on linux. To run them do
516518

517519
--------------------------------------------
518520
cd $PACKAGING_ARCHIVES
@@ -524,18 +526,36 @@ sudo bats $BATS_TESTS/*.bats
524526
sudo bats $BATS_TESTS/20_tar_package.bats $BATS_TESTS/25_tar_plugins.bats
525527
--------------------------------------------
526528

527-
To run the Java packaging tests, again inside the VM
529+
The new packaging tests are written in Java and run on both linux and windows. On
530+
linux (again, inside the VM)
528531

529532
--------------------------------------------
530-
bash $PACKAGING_TESTS/run-tests.sh
533+
# run the full suite
534+
sudo bash $PACKAGING_TESTS/run-tests.sh
535+
536+
# run specific test cases
537+
sudo bash $PACKAGING_TESTS/run-tests.sh \
538+
org.elasticsearch.packaging.test.DefaultZipTests \
539+
org.elasticsearch.packaging.test.OssZipTests
531540
--------------------------------------------
532541

533-
or on Windows
542+
or on Windows, from a terminal running as Administrator
534543

535544
--------------------------------------------
545+
# run the full suite
536546
powershell -File $Env:PACKAGING_TESTS/run-tests.ps1
547+
548+
# run specific test cases
549+
powershell -File $Env:PACKAGING_TESTS/run-tests.ps1 `
550+
org.elasticsearch.packaging.test.DefaultZipTests `
551+
org.elasticsearch.packaging.test.OssZipTests
537552
--------------------------------------------
538553

554+
Note that on Windows boxes when running from inside the GUI, you may have to log out and
555+
back in to the `vagrant` user (password `vagrant`) for the environment variables that
556+
locate the packaging tests and distributions to take effect, due to how vagrant provisions
557+
Windows machines.
558+
539559
When you've made changes you want to test, keep the VM up and reload the tests and
540560
distributions inside by running (on the host)
541561

Vagrantfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Vagrant.configure(2) do |config|
3131
# Give the box more memory and cpu because our tests are beasts!
3232
vbox.memory = Integer(ENV['VAGRANT_MEMORY'] || 8192)
3333
vbox.cpus = Integer(ENV['VAGRANT_CPUS'] || 4)
34+
35+
# see https://github.com/hashicorp/vagrant/issues/9524
36+
vbox.customize ["modifyvm", :id, "--audio", "none"]
3437
end
3538

3639
# Switch the default share for the project root from /vagrant to
@@ -97,15 +100,15 @@ Vagrant.configure(2) do |config|
97100
rpm_common config, box
98101
end
99102
end
100-
'fedora-26'.tap do |box|
103+
'fedora-27'.tap do |box|
101104
config.vm.define box, define_opts do |config|
102-
config.vm.box = 'elastic/fedora-26-x86_64'
105+
config.vm.box = 'elastic/fedora-27-x86_64'
103106
dnf_common config, box
104107
end
105108
end
106-
'fedora-27'.tap do |box|
109+
'fedora-28'.tap do |box|
107110
config.vm.define box, define_opts do |config|
108-
config.vm.box = 'elastic/fedora-27-x86_64'
111+
config.vm.box = 'elastic/fedora-28-x86_64'
109112
dnf_common config, box
110113
end
111114
end
@@ -237,6 +240,7 @@ def linux_common(config,
237240

238241
config.vm.provision 'markerfile', type: 'shell', inline: <<-SHELL
239242
touch /etc/is_vagrant_vm
243+
touch /is_vagrant_vm # for consistency between linux and windows
240244
SHELL
241245

242246
# This prevents leftovers from previous tests using the

build.gradle

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ import java.nio.file.Files
3636
import java.nio.file.Path
3737
import java.security.MessageDigest
3838

39+
plugins {
40+
id 'com.gradle.build-scan' version '1.13.2'
41+
}
42+
if (properties.get("org.elasticsearch.acceptScanTOS", "false") == "true") {
43+
buildScan {
44+
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
45+
termsOfServiceAgree = 'yes'
46+
}
47+
}
48+
3949
// common maven publishing configuration
4050
subprojects {
4151
group = 'org.elasticsearch'
@@ -195,9 +205,9 @@ subprojects {
195205
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
196206
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
197207
"org.elasticsearch:elasticsearch:${version}": ':server',
198-
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
199-
"org.elasticsearch:elasticsearch-core:${version}": ':libs:elasticsearch-core',
200-
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
208+
"org.elasticsearch:elasticsearch-cli:${version}": ':libs:cli',
209+
"org.elasticsearch:elasticsearch-core:${version}": ':libs:core',
210+
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:nio',
201211
"org.elasticsearch:elasticsearch-x-content:${version}": ':libs:x-content',
202212
"org.elasticsearch:elasticsearch-secure-sm:${version}": ':libs:secure-sm',
203213
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
@@ -216,6 +226,7 @@ subprojects {
216226
"org.elasticsearch.distribution.deb:elasticsearch:${version}": ':distribution:packages:deb',
217227
"org.elasticsearch.distribution.deb:elasticsearch-oss:${version}": ':distribution:packages:oss-deb',
218228
"org.elasticsearch.test:logger-usage:${version}": ':test:logger-usage',
229+
"org.elasticsearch.xpack.test:feature-aware:${version}": ':x-pack:test:feature-aware',
219230
// for transport client
220231
"org.elasticsearch.plugin:transport-netty4-client:${version}": ':modules:transport-netty4',
221232
"org.elasticsearch.plugin:reindex-client:${version}": ':modules:reindex',
@@ -301,7 +312,15 @@ gradle.projectsEvaluated {
301312
// :test:framework:test cannot run before and after :server:test
302313
return
303314
}
304-
configurations.all {
315+
configurations.all { Configuration configuration ->
316+
/*
317+
* The featureAwarePlugin configuration has a dependency on x-pack:plugin:core and x-pack:plugin:core has a dependency on the
318+
* featureAwarePlugin configuration. The below task ordering logic would force :x-pack:plugin:core:test
319+
* :x-pack:test:feature-aware:test to depend on each other circularly. We break that cycle here.
320+
*/
321+
if (configuration.name == "featureAwarePlugin") {
322+
return
323+
}
305324
dependencies.all { Dependency dep ->
306325
Project upstreamProject = dependencyToProject(dep)
307326
if (upstreamProject != null) {
@@ -524,7 +543,7 @@ subprojects { project ->
524543
}
525544
}
526545

527-
/* Remove assemble on all qa projects because we don't need to publish
546+
/* Remove assemble/dependenciesInfo on all qa projects because we don't need to publish
528547
* artifacts for them. */
529548
gradle.projectsEvaluated {
530549
subprojects {
@@ -534,6 +553,11 @@ gradle.projectsEvaluated {
534553
project.tasks.remove(assemble)
535554
project.build.dependsOn.remove('assemble')
536555
}
556+
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
557+
if (dependenciesInfo) {
558+
project.tasks.remove(dependenciesInfo)
559+
project.precommit.dependsOn.remove('dependenciesInfo')
560+
}
537561
}
538562
}
539563
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,10 @@ class BuildPlugin implements Plugin<Project> {
762762

763763
private static configureDependenciesInfo(Project project) {
764764
Task deps = project.tasks.create("dependenciesInfo", DependenciesInfoTask.class)
765-
deps.dependencies = project.configurations.compile.allDependencies
765+
deps.runtimeConfiguration = project.configurations.runtime
766+
deps.compileOnlyConfiguration = project.configurations.compileOnly
767+
project.afterEvaluate {
768+
deps.mappings = project.dependencyLicenses.mappings
769+
}
766770
}
767771
}

0 commit comments

Comments
 (0)